- array_push: documentation ( source)
- var_dump: documentation ( source)
<?php
$newdata = array (
'wpseo_title' => 'test1',
'wpseo_desc' => 'test2',
'wpseo_metakey' => 'test3'
);
$count=0;
foreach ($newdata as $key => $newdat) {
$count++;
echo $newdat;echo $count;
}
var_dump($newdat);
// for recipe
$md_array["recipe_type"][] = $newdata;
//for cuisine
$md_array["cuisine"][] = $newdata;
array_push($md_array["cuisine"],$newdata);
//var_dump($md_array["cuisine"]);
?>