php - Get value from a array -


update

How do I get this value? I need to do this if I will write values ​​in my database.

  array (3) {[1] = & gt; Tap [2] = & gt; Array (2) {[123] = & gt; Int (123) [122] = & gt; Int (0)} [3] = & gt; NULL} 

Something is missing in your output I think that looks like this:

  // var_dump ($ array); Array (1) {[0] = & gt; String (2) "39"}   

so that you can use the value with the $ array [0] . Simple Array Use

ARX is the most important data structure in PHP, you should learn how to behave with them.
Read.

Update:

Regarding your updates, what value do you want? You have a multi-dimensional array that you will get:

  $ array [1] returns $ zero array [2] // gives an array $ array [2] [123] / / Gives the integer 123 $ array [2] [122] // gives the integer 0 $ array [3] // provides zero   

Maybe you get all Also want to loop on internal array value: <$> $ {value = & gt; Do something with $ {$ something and $ value} as the $ value

As I said, read the document, it has everything in it What you need to know Accessing ARAGs in PHP is not much different than other programming languages.

There are so many examples in the PHP manual, this is a very beautiful documentation!

Comments