0
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 appears 5, sometimes appears 30 names.
I need to limit the display of the names as follows, show the names until the end of the DIV and at the end appear a counter of the missing ones. For example, instead of appearing NOME1,NOME2,NOME3,NOME4,NOME5 in a DIV that only fits 3 names, appear, NOME1,NOME2,THERE ARE 3 MORE NAMES.
How can I do that?
Today I am showing the names on the screen with the query below, however, sometimes occurs the cited problem.
<?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>