jaymc Posted October 21, 2006 Share Posted October 21, 2006 Right, im having trouble getting to while loops to work in the same script. here is the syntax of the while loop[code]while ($resultsa = mysql_fetch_array($runquerya)) {echo $resultsa[FROM];}[/code][code]while ($resultsb = mysql_fetch_array($runqueryb)) {echo $resultsb[TO];}[/code]$runqueryb/$runquerya is the result of a MYSQL query which Im sure is obvious.The problem is, the second While loop does not work/execute/proceed...Im just wondering why. Is it a fault with my code? Or can you only call a while loop or array fetch once?Any help would be great Quote Link to comment https://forums.phpfreaks.com/topic/24658-while-fetch-array/ Share on other sites More sharing options...
jaymc Posted October 21, 2006 Author Share Posted October 21, 2006 EditActually, I think I might know the problem...Once a variable has had the array fetch from it, does that variable then become empty meaning it cant be used again to retrieve the array? Quote Link to comment https://forums.phpfreaks.com/topic/24658-while-fetch-array/#findComment-112308 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.