looping through an array
| From: | Andy B | Date: | Sun, 04 Apr 2004 00:22:49 +0000 |
| Subject: | looping through an array | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-182268@lists.php.net to get a copy of this message | ||
hi...
i have a combo box that is filled with a query from an sql table...
this is its logic:
if $_SESSION['guestbook'] doesnt exist
then query database, fill $_SESSION['guestbook'] with its values from the db, turn the
"value" part of the <option> into the values from
$_SESSION['guestbook']['Number'] and when done close the box...
if $_SESSION['guestbook'] already exists and is filled then use those existing values to
do the above (fill the combobox)
the part i have the problem with is how to get $_SESSION['guestbook'] to do the above if
it already exists...
i tried using while($_SESSION['guestbook']) but it proves in php's mind to be blank
or that whole statement gets ignored...
help...