gammaman Posted April 27, 2008 Share Posted April 27, 2008 Is there a way to code something that does While a variable that is an array still has elements. Quote Link to comment Share on other sites More sharing options...
p2grace Posted April 27, 2008 Share Posted April 27, 2008 while(count($array) > 0){ } Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted April 27, 2008 Share Posted April 27, 2008 or using empty: while (!empty($array)) { $current_element = array_pop($array); echo $current_element; } http://www.php.net/empty 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.