View Single Post
Old 07-17-2009, 12:46 PM   #1 (permalink)
russellharrower
The Contributor
 
russellharrower's Avatar
 
Join Date: Jul 2009
Posts: 80
Thanks: 13
russellharrower is on a distinguished road
Red face Need to output MYSQL as array(1 => 'January', 'feb', 'March');

Hi I need to be able to print the output of the mysql request ($quarry) into a array(1 => 'January', 'feb', 'March');

But instead of January, feb and March it needs to have the title output.

If you can help that would be great.

Thanks
Code:
$query = "SELECT id, title, content FROM push_content WHERE type = 0 ORDER by date DESC LIMIT 1";


if ($result = $mysqli->query($query)) {

    /* fetch associative array */
    while ($obj = mysqli_fetch_object($result)) {
        printf ("%s (%s)\n", $obj->title, $obj->content);
		echo"<br/>";
    }

    /* free result set */
    mysqli_free_result($result);
russellharrower is offline  
Reply With Quote