php - Use mysql_fetch_array() with foreach() instead of while() - Stack Overflow
There's not a good way to convert it to foreach, because mysql_fetch_array() just fetches the next result from $result_select. If you really wanted to foreach, you could do pull all the results into an array first, doing something like the following: $res...