I have a Mysql query that gives the following result as using
while($row = mysql_fetch_array($res))
x | 12432
y | 232432
z | 323423
I want to take each column and put it in a new array in order to export them in a table that would look like
x | y | z
12432 | 232432 | 323423
If I fetch the same query more than once, the second row does not show up.
Can you please help?
mysql_*
functions in new code. They are no longer maintained and are officially deprecated. See the red box? Learn about prepared statements instead, and use PDO or MySQLi - this article will help you decide which. If you choose PDO, here is a good tutorial. – h2ooooooo Nov 13 '13 at 16:07