Skip navigation.
Home

Add new comment

I took some code out of this

I took some code out of this WTF and added some demo values. Guess how well the original code works ... <? $temp = array(); $files=array(1,2,3); $tt=array(4,5,6); // --- WTF CODE BEGIN --- $temp[1]=implode("/¨*'*¨/",$files); $temp[2]=implode("/¨*'*¨/",$tt); if(isset($files)) unset($files); if(isset($tt)) unset($tt); $temp[3]=$temp[1].$temp[2]; $files=explode("/¨*'*¨/",$temp[3]); // --- WTF CODE END --- print_r($files); Output: Array ( [0] => 1 [1] => 2 [2] => 34 [3] => 5 [4] => 6 ) Wow, I'm impressed. I guess I will use this instead of array_merge() now, it makes so much more sense.

Reply




*

  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <p> <br>
  • Web and e-mail addresses are automatically converted into links.