Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the value from nested array in php

Tags:

arrays

php

When I submit the form by post method i am getting the value like this for an array.

 array
 'custom_profile_type' => 
    array
       0 => string '39242' (length=5)
    'satori_programme' => string '0' (length=1)

I want the value 39242 from above array. How to get that? Any idea guys ?

like image 780
UI Dev Avatar asked Mar 15 '14 06:03

UI Dev


1 Answers

Access it like..

echo $yourarray['custom_profile_type'][0];
like image 147
Shankar Narayana Damodaran Avatar answered Sep 24 '22 10:09

Shankar Narayana Damodaran