Creating an array from a MySQL table
Posted
by Rob
on Stack Overflow
See other posts from Stack Overflow
or by Rob
Published on 2010-04-26T17:09:58Z
Indexed on
2010/04/26
17:13 UTC
Read the original article
Hit count: 124
I'm trying to create an array to use for a curl_multi_exec, but I can't seem to create the array properly.
Here is my code:
$SQL = mysql_query("SELECT url FROM urls") or die(mysql_error()); //Query the shell table
while($resultSet = mysql_fetch_array($SQL)){
$urls[]=$resultSet;
}
echo $urls; //Test that the array works
But when I run this script, all it does is echo "Array"
I have no idea what I'm doing wrong, I've checked around google a bit, but can't figure it out. Any insight would be appreciated.
© Stack Overflow or respective owner