My current project consist of multidimensional arrays in which it holds a date and some text contents.
I already used the normal arrays in my project and array_push() is used for inserting an element to array. Now I'm stuck with a multidimensional array in which I don't know how to insert and display multidimensional array data.
I created a multidimensional array like this:
$complaints = array(
$each_complaints => array(
"date" => "",
"text" => ""
)
);
then I want to add data's into this array on the loop of mysql result
<?php foreach($query_56 as $notes):
// eg: array_push " $notes->date , $notes->corresponding_text "
endforeach; ?>
I want to display the array like this:
array[date][text]=> [2014-11-18] [1st complaint]
array[date][text]=> [2015-01-15] [2nd complaint]
How can I achieve this?