I need to solve the following problem:
I have a div that displays a list of names that are loaded according to a query condition.
This list of names varies a lot, sometimes it appears 5, sometimes 30 names appear.
I need to limit the display of the names as follows, the names appear until the end of the DIV and at the end a counter of the missing ones appears. For example, instead of appearing NAME1, NAME2, NAME3, NAME4, NAME5 in a DIV that only fits 3 names, appears, NAME1, NAME2, THERE ARE MORE THAN 3 NAMES.
How can I do this?
Today I'm showing the names on the screen with the query below, but sometimes the problem occurs.
<?php
while (($row = oci_fetch_array($nomes, OCI_ASSOC+OCI_RETURN_NULLS)) != false) {
$NOME = $row['NOME'];
<div id="linhaazul">
<div id="celpaciente"><b><?echo $NOME ?></b></div>
</div>