Answers for "array example in php"

PHP
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
3

php arrays

$nums = [1, 2, 3, 4, 5];
Posted by: Guest on October-03-2020
0

php array

$array = [];
Posted by: Guest on April-14-2021
0

array php

Array
(
    [0] => Array
        (
            [name] => phone
            [price] => 700
        )

    [1] => Array
        (
            [name] => note
            [price] => 20
        )

    [2] => Array
        (
            [name] => book
            [price] => 49
        )

)
Posted by: Guest on June-28-2021

Browse Popular Code Answers by Language