Advertisement
Guest User

Untitled

a guest
Sep 25th, 2016
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. 0,1,2,3,4,5,6,7,8,9,10,11,12,"e","f"
  2.  
  3. 0 1 2 3 4 5 e f
  4.  
  5. $mass=array($a=array($b=array(0,1,2,3,4,5),6,7,8,9,10),11,12,"e","f");
  6.  
  7. for($i=0;$i<count($mass);$i++){
  8. for($y=0;$y<count($mass[$i]);$y++){
  9. for($z=0;$z<count($mass[$i][$y]);$z++){
  10. echo $mass[$i][$y][$z];
  11. echo "</br>";
  12. }
  13. }
  14. }
  15.  
  16. <?php
  17. $mass=array(array(array(0,1,2,3,4,5),6,7,8,9,10),11,12,"e","f");
  18.  
  19. function pr_all($arr)
  20. {
  21. $out = '';
  22. foreach ( $arr as $a ) {
  23. if ( is_array($a) ) {
  24. $out .= pr_all($a);
  25. } else {
  26. $out .= $a . '<br>';
  27. }
  28. }
  29. return $out;
  30. }
  31.  
  32. echo pr_all($mass);
  33.  
  34. 0<br>1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9<br>10<br>11<br>12<br>e<br>f<br>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement