Answers for "php array access by key"

PHP
0

php array access by key

$newarray = array();
foreach($shop as $key=>$value) {
    $newarray[$key]['Title'] = $value['Title'];
    $newarray[$key]['Number'] = $value['Number'];
}
echo "<pre>";print_r($newarray);
Posted by: Guest on April-30-2021

Browse Popular Code Answers by Language