Answers for "php array key 2 variable"

PHP
0

merge two arrays one as key to another php

// two arrays one become keys and second becomes values
array_combine ( array $keys , array $values );
Posted by: Guest on November-02-2020
4

php array

<?php
$array = array(
    "foo" => "bar",
    42    => 24,
    "multi" => array(
         "dimensional" => array(
             "array" => "foo"
         )
    )
);

var_dump($array["foo"]);
var_dump($array[42]);
var_dump($array["multi"]["dimensional"]["array"]);
?>
Posted by: Guest on June-17-2020

Browse Popular Code Answers by Language