I have a query where my PHP file calls all the records from within a table.
I am having great difficulty beign able to return all the information into a new array for everything...
heres an example.
I have a table name 'thisThat' and it is made up of the following fields:
ID | body | author
Now within this table i have 2 records:
1 | hello world | pablo
2 | this and That | mike
I want to pull all this information out and store it ina single array 'news' in the following form:
$news = array(
"article1" => array ( "ID" => "1", "body" => "hello world", "author" => "pablo", )
"article2" => array ( "ID" => "2", "body" => "this and That", "author" => "mike", )
);
Im not to sure how to deal with all the elements returned with mysql_fetch_row. i.e each row is a different array. Is there anyway I can have it store all the info taking into account the addition of any colomns or renaming of fields which may occur?
Does this make any sense 'cause Ive gone cross-eyed.