View Full Version : Returning mysql array values via function.

08-27-2011, 08:46 PM

I'm trying to return mysql values via function.

basically I have these two:

function create() {


echo $data[0]['uname'];

function load_user() {

while($row = mysql_fetch_array($result)){


return $queryData;


any help? Someone suggested me those code but it doesn't seem to work :(


08-27-2011, 09:37 PM
You don't have a mysql query in there anywhere.

$result = mysql_query("select * from <tablename>");

Put that above your mysql_fetch_array line.

08-27-2011, 10:44 PM
Ya I can't believe I missed something simple as that. Thanks tangoforce...everything's working smoothly :)


EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum