I have while loop in a PHP file and outside of that, I have one variable. When I try to add this variable into while, it doesn't work.
example code:
<? $var1 = 2999288; while($row = mysql_fetch_array($result)){ echo $var1; } ?> Can anybody tell me a solution, how to echo that variable into a while? Or what I'm doing wrong?
echoing, then you're DB Query probably isn't returning any results. Before the loop do a:echo mysql_affected_rows($db);