Darkmatter5 Posted October 18, 2011 Share Posted October 18, 2011 How can I call a function that queries a database and return the query and store that return in a variable.My function return : return mysql_fetch_array($result);The call is : $title = self::title($_GET['id']);I basically want to now use $title within the scope of the call.Thank you in advance. Link to comment Share on other sites More sharing options...
boen_robot Posted October 18, 2011 Share Posted October 18, 2011 mysql_fetch_array, as the name implies, returns an array, so $title will be an array. If your query returns more than a single result, you won't be able to get anything beyond the first row. If that's not a problem for you, then... what's your problem? $title should have just what you want - an array. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.