Re: session_name("CCLTrolley")

From: Date: Wed, 05 Oct 2005 01:27:15 +0000
Subject: Re: session_name("CCLTrolley")
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14  Groups: php.general 
Request: Send a blank email to php-general+get-223634@lists.php.net to get a copy of this message
Robert Cummings wrote:
On Mon, 2005-10-03 at 18:08, John Taylor-Johnston wrote: Use "foreach" to traverse the array and display each trolly entry nicely
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. I ended up going with this. Wasn't sure how to use list anyhow. Look good?
$sql = 'SELECT * FROM '.$table.' ORDER BY RNum;'; echo "<!--".$sql."-->"; $news = mysql_query($sql); while ($mydata = mysql_fetch_object($news))
     {
foreach ($_SESSION['TrolleyContents'] as $value) if ($value == $mydata->RNum) { }
      }


« previous php.general (#223634) next »