Advertisement
Guest User

Untitled

a guest
Aug 16th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  1. <?php
  2.  
  3. function listDataByString($data, $deli)
  4. {
  5.     $words = explode($deli, $data);
  6.     $max = count($words);
  7.    
  8.     for($o=0;$o<$max;$o++)
  9.     {
  10.         for($i=0;$i<$max;$i++)
  11.         {
  12.             echo "$words[$i] ";
  13.         }
  14.        
  15.         array_push($words, $words[0]);
  16.         array_shift($words);
  17.        
  18.         echo "<br />";
  19.     }
  20. }
  21.  
  22. listDataByString('1 2 3 4 5 6 7 8 9', ' ');
  23.  
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement