Re: multiple table rows into an array, and creating a calendar

From: Date: Thu, 13 Nov 2003 09:59:19 +0000
Subject: Re: multiple table rows into an array, and creating a calendar
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-169461@lists.php.net to get a copy of this message
Dave G wrote:
Burham
why don't you do an in_array() check for each date that you print. Hope this helps.
Yes, this helps a lot! However, I'm still stuck on how to get my list of dates into the array. I've been searching around on the Internet, and it seems that one has to construct a for() loop in order to get the results of multiple rows into an array. But that seems unnecessarily complicated. Is there no command to take multiple rows and place them into an array?
I believe this was asked recently on the list, you might want to check the archives. Just off the top of my head, something like this should work : $dates = array(); while($row = mysql_fetch_assoc($result)) { $dates[] = $row; } echo "<pre>"; print_r($dates); echo "</pre>"; TIAS :) -- Burhan Khalid phplist[at]meidomus[dot]com http://www.meidomus.com ----------------------- "Documentation is like sex: when it is good, it is very, very good; and when it is bad, it is better than nothing."

« previous php.general (#169461) next »