How to push a 2-dimensional array?

I’m trying to achieve something like this:


$fruits = array (
"fruits.jpg" => array("34262","5 Jun 09:49"),
"numbers.jpg" => array("54132","6 Jun 15:42"),
"holes.jpg" => array("12901","17 Aug 14:30")
);

Here is my code so far (haven’t been able to figure out, how to push the “$size” & “$date” variables into the array):


<?php
$fruits = array();
$contents = ftp_rawlist($conn_id, "/path_to_the_folder/");
 
foreach ($contents as $entry) {
 
$entry = ereg_replace( "([\x20]+)", "\x20", $entry);
$entry = explode("\x20", $entry);
 
$filename = $entry["8"];
$size = $entry["4"];
$date = "".$entry["6"]." ".$entry["5"]." ".$entry["7"]."";
 
if($filename != "." && $filename != ".."){
array_push($fruits ,$filename);
}
}
?>