Skip to content

Tag: multidimensional-array

Array inside arrays of arrays

I need help, I can’t assign the single values of the array inside the array of the array to a variable. I could assign the values of the second dimension array to single variables like this: But how can I use a second loop to count and extract the single values of the products?I have tried with a second…

String to Multi-Dimensional array in PHP

Imagine that I have a variable that contains following value: I want to parse this string and create actual multi-dimensional array in PHP. For example: For that purpose, first of all I tried to parse that string via regular expression: However I failed when I tried it as following: And the output is: So; How…