John Taylor-Johnston wrote:
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)
{
}
}
Why not replace the foreach and if combo inside the while with:
if( array_search( $mydata->RNum, $_SESSION['TrolleyContents'] ) !==
false ) {
}
--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php