![]() |
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"; |
why don't you use the fetch associative array static method instead of the mysqli_fetch_object?
|
because i need the ability to call each title by them self.
if you can do an example on how i would do that using that code, that would be helpful. |
If you go object oriented style, keep it that way:
PHP Code:
|
Quote:
I want to be able to call each title like $title1 = "this is title 1"; $title2 = "this is title2"; $title3 = "this is title3"; etc... As I want to allow the template designer to choose how many stories to show on the front page in there design. I also want to show the content this way. I then want to come up with a way to have global plugins that will allow the users to choose if they want to show the posters name, date published etc... I hope that helps. Thanks |
Well, this would be easier.
PHP Code:
|
Quote:
|
Quote:
PHP Code:
|
But i need to give each one a $title->1, $title->2 etc that code will only print the data
|
Quote:
PHP Code:
|
have a look what that does http://www.designvisa.com/beta
|
Quote:
|
Quote:
|
http://www.designvisa.com/beta/index2.php sorry about that
|
| All times are GMT. The time now is 05:47 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0