Jump to content

[SOLVED] How do I Jump out of a multidimensional array?


Cradenburg

Recommended Posts

Taith's function:

 

<?php

function array_flatten($array){
$out=array();
foreach($array as $k=>$v){
  if(is_array($array[$k])){
   $out=array_merge($out,array_flatten($array[$k]));
  }else{
   $out[]=$v;
  }
}
return $out;
}

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.