January 16th, 2000, 09:24 PM
I'm new to PHP and i'm after some help to put the results from a database query into an array and then total the information in the array depending on the room numbers given, 1 tru 35.
eg. Results 2,5,12,24,30
level 1 - 2
level 2 - 1
level 3 - 2
Total rooms used 5
January 16th, 2000, 11:33 PM
if I am understanding your question correctly, you are asking for a way to count your results from a query using php...?
if this is correct, all you need to do is enter:
$count = mysql_num_rows($result);
enter this right after your connection to your database, then enter something like
<font COLOR='#FFcc00' size='2'>Total Rooms: $count</font>
Let me know if this is what your question was...?
[This message has been edited by tucats (edited January 16, 2000).]