$query = mysql_query("SELECT text FROM `content` ORDER BY RAND() LIMIT 0,6"); $hooray = array(); while($result = mysql_fetch_array($query)) { $hooray[] = $result; } print_r($hooray);
Ah-hah. The problem is with how I'm trying to print the array elements.
If I use "print" it just outputs "Array". print_r prints the content, but does it like this:
Array ( [0] => The service was excellent. [text] => The service was excellent. )
How on earth do i just get the bit of text I need out of it?! This shit was so easy in QBASIC :(
(hug)
Thank you! That was the vital bit of information that I couldn't be bothered getting my huge, and severely out of date, PHP book down off the shelf for (kiss)
Yay, it's all working now, I think I can forget about it now.
Pete: It was implied.