Re: session_name("CCLTrolley")

From: Date: Tue, 04 Oct 2005 18:12:35 +0000
Subject: Re: session_name("CCLTrolley")
References: 1 2 3 4 5 6 7 8 9 10 11 12 13  Groups: php.general 
Request: Send a blank email to php-general+get-223619@lists.php.net to get a copy of this message
On Mon, 2005-10-03 at 18:08, John Taylor-Johnston wrote: > >Use "foreach" to traverse the array and display each trolly entry nicely > > This might be cleaner? I'm not sure if I'm using while and list right, > but somehting like that? > > $glquery = mysql_query($sql); > while ($mydata = mysql_fetch_object($glquery)) { > > while (list($_SESSION['TrolleyContents'], $value) = $mydata->RNum) > { > echo "$mydata->RNum - $mydata->field1: $mydata->field2."; > } > > } If list() works for you it's fine. I don't really use it so not entirely sure of it's functionality with respect to looping. Cheers, Rob. -- .------------------------------------------------------------. | InterJinn Application Framework - http://www.interjinn.com | :------------------------------------------------------------: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `------------------------------------------------------------'

« previous php.general (#223619) next »