mardi 1 août 2017

Extract a particular key values to sparate array in PHP

The array structure is like this

    $array1 = [
   "101" => [
        "name" => "Robin",
        "age" => "25"
    ],
    "102" => [
        "name" => "asRobin",
        "age" => "25"
    ],
    "103" => [
        "name" => "Roasbin",
        "age" => "25"
    ],
    "104" => [
        "name" => "Robiasn",
        "age" => "25"
    ]
  ]

Here I got the ids in a particular array using $ids = array_keys($array1) function. Now likewise how can i extract the names



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire