3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $newdata = array ( 'wpseo_title' => 'test', 'wpseo_desc' => 'test', 'wpseo_metakey' => 'test' ); // for recipe $md_array["recipe_type"][] = $newdata; //for cuisine $md_array["cuisine"][] = $newdata; array_push($md_array["cuisine"],$newdata); var_dump($md_array["cuisine"]); ?>
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
array(2) { [0]=> array(3) { ["wpseo_title"]=> string(4) "test" ["wpseo_desc"]=> string(4) "test" ["wpseo_metakey"]=> string(4) "test" } [1]=> array(3) { ["wpseo_title"]=> string(4) "test" ["wpseo_desc"]=> string(4) "test" ["wpseo_metakey"]=> string(4) "test" } }