Soldato
Hi, I've been dabbling in PHP for months now so I know I should know this, but can anyone confirm I would be doing this right if I made an array like this -
Then added it to an array like this -
Would I then access the comments for example, like this -
And how would I sort the items by 'date', given the date format goes yyyy-mm-dd, so should work as a straight forward sort?
Thanks!
Code:
$item = array(
"date" => $date,
"name" => $name,
"comment" => $comment
);
Then added it to an array like this -
Code:
array_push($items, $item);
Would I then access the comments for example, like this -
Code:
$thisComment = $items[$x]['comment'];
And how would I sort the items by 'date', given the date format goes yyyy-mm-dd, so should work as a straight forward sort?
Thanks!