monkeytooth Posted April 28, 2008 Share Posted April 28, 2008 Not to positive about this so I'm gonna ask here.. For staters im not sure this is gonna work right as its a loop in a loop, but who knows it may.. over all though.. here it is $counter = "1"; while ($row = mysql_fetch_array($query)) { foreach ($row['pref'] >= '0') { echo $counter . ".) " . $row['ptitle'] . " - " . $row['pref'] . "<br>"; $counter++; } } error is Parse error: parse error, unexpected ')' Link to comment https://forums.phpfreaks.com/topic/103259-solved-while-and-foreach/ Share on other sites More sharing options...
monkeytooth Posted April 28, 2008 Author Share Posted April 28, 2008 nevermind.. was thinking to deeply into things lol.. change foreach to if, got it to work.. lol Link to comment https://forums.phpfreaks.com/topic/103259-solved-while-and-foreach/#findComment-528869 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.