![]() |
looping problem
$r=0; $sql = "SELECT * FROM news ORDER BY id DESC"; $result = mysql_query($sql); while($rows = mysql_fetch_array($result) || $r!=3 ) { echo $r.'<br/>'; echo $rows['datenum']; echo'<br/>'; $r = $r+1; } ths code make my browser er.. how do i say it... just BANG! hahaha i think my codes are right but why doe the lopp does not stop i already had put a condition for the loop tp stop yet i just wont.. thanx for the help... peace... |
PHP Code:
(Doing this reminded me on my dependance on a database wrapper...I haven't actually used mysql_fetch_array since php4 I think) |
Could you please try to use better English next time? I find it hard to put time into someone who does not take their problem seriously enough to use English.
|
| All times are GMT. The time now is 06:24 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0