So, I'm building my first super basic CMS using PHP. I don't want to simply copy the code from the tutorial I'm watching, but really understand it. One thing that bothers me is the use of the while loop for fetching posts. In the code below, I can't see how the statement inside within the rounded brackets constitute a condition. Seems to me all it does is assigning an array to the variable $post. How can you loop over something that is not a condition is my question, I suppose. Thanks!
function get_posts () {
$query = mysql_query("SELECT * FROM posts") or die(mysql_error());
while ($post = mysql_fetch_assoc($query)) {
echo $post['Content'];
}
}