I have two test arrays below “$companydocs” and “$companydocs2”. I am trying to work on “$companydocs2” and build an array from a string based on a mysql query.
[B]Why isn’t my array data from $companydocs2 matching up with $companydocs when I var_dump() both of them?
[code=php]
// this is what I want
$companydocs = Array();
$companydocs = array
(
“date1″=>array( “presentation”=>array(“http://yahoo.com1”), “execsum”=>array(“http://google.com2”), “ppt”=>array(“http://cnn.com3”)),
“date2″=>array( “presentation”=>array(“http://yahoo.com4”), “execsum”=>array(“http://google.com5”)),
“date3″=>array( “execsum”=>array(“http://google.com6”))
);
// need help below building an array to match the output from the above array
$companydocs2 = Array();
$companydocs2 .= ‘array(‘;
$companydocs2 .= ‘”date1″=>array( “presentation”=>array(“http://yahoo.com1”), “execsum”=>array(“http://google.com2”), “ppt”=>array(“http://cnn.com3”)),’;
$companydocs2 .= ‘”date2″=>array( “presentation”=>array(“http://yahoo.com4”), “execsum”=>array(“http://google.com5”)),’;
$companydocs2 .= ‘”date3″=>array( “execsum”=>array(“http://google.com6”))’;
$companydocs2 .= ‘)’;
// end help
var_dump($companydocs);
echo “<hr />”;
var_dump($companydocs2);