It's friday, so I am obviously not seeing things strait so I thought to ask here.
I want to get a list of names from the database using:
$test = mysql_query("SELECT Names FROM Content ORDER BY Names");
This should give JimMikePeter (at least it does in PHP MyAdmin)
This is not very readable so I thought, lets implode:
$line = implode( ", ", $test);
echo $line;
This should give: Jim, Mike, Peter but it doesn't, it gives: Warning: implode() [function.implode]: Invalid arguments passed
Also I want the result like this: "Jim", "Mike", "Peter" (with quotes)
Any thoughts?
implode()accepts an array as it's 2nd parameter, you're currently passing the return value frommysql_querywhich isn't an array. - Clive