Click here to Skip to main content
14,971,029 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I've an array which is associative.
For eg: $ma_name['name'];has 3 values which I can check using printing it.

My question is how to get the 1st value alone when I run this array in loop.

I tried this; $ma_name[0]['name']; which I get the output as 1st letter of the output.
Posted

1 solution

You can refer this

get-first-element-of-an-array[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900