DeepakJ Posted July 30, 2007 Share Posted July 30, 2007 How do you abort a while loop if a condition is met and the appropriate actions according to that loop have been taken. while($row2=mysql_fetch_array($bResult)){ if ($row2['productid']="") { $tableid = $row2['tableid']; $queryc = "UPDATE productid SET productid='$productid' WHERE tableid = $tableid"; } } I simply would like to abort the loop at the first instance of the nullstring. Help would be greatly appreciated. Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted July 30, 2007 Share Posted July 30, 2007 http://www.php.net/break Quote Link to comment Share on other sites More sharing options...
DeepakJ Posted July 30, 2007 Author Share Posted July 30, 2007 Thanks again for the help. Quote Link to comment 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.