-1

I have a blackout, i have an array ($array) like this:

Array
(
    [Resume] => Array
        (
            [lang] => en
            [web] => http://
            [id] => Array
                (
                    [IdValue] => 222
                )
         )
)

how i can get only the value of [IdValue]

Em Hi
  • 59
  • 6

1 Answers1

1

You should look more into PHP arrays. But if I assume your example is in PHP then you can read it like this:

$myVar = Array // your array definition
// (
//  Resume] => Array
//     (
//         [lang] => en
//         [web] => http://
//         [id] => Array
//             (
//                 [IdValue] => 222
//             )
//      )
// )

echo $myVar['Resume']['id']['IdValue']; // prints 222
M. Kebza
  • 1,488
  • 1
  • 10
  • 14
  • i know now what i am doing bad. my array ist not an array, it is a string. is there an option to convert this string to array? – Em Hi May 21 '18 at 02:09
  • If string is JSON / Serialized array then yes using function like `json_decode`, `unserialize`. But output you have provided looks like `print_r` output and there is no standard function to turn it back to array unless you write your own. – M. Kebza May 21 '18 at 03:18