Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php foreach multidimensional array recursive

function process($array) {
    foreach ($array as $key=>$value) {
        // Process the content of the array
    }
    if (isset($array[8])) // If we have linked arrays
        foreach($array[8] as $subArray)
            process($subArray);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #foreach #multidimensional #array #recursive
ADD COMMENT
Topic
Name
4+4 =