Advertisement
contatowellington

Untitled

Sep 6th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. <?php
  2.  
  3. $tabela1 = array(1,2,3,4,5,6,7,8,9);
  4. $tabela2 = array('a', 'b', 'c');
  5.  
  6. $cont = 1;
  7. $aux = 0;
  8.  
  9. while(count($tabela1) > $aux){
  10. if($cont <= 3){
  11. echo $tabela1[$aux].'<br>';
  12. $aux++;
  13. }else{
  14. echo $tabela2[0].'<br>';
  15. array_shift($tabela2);
  16. $cont = 0;
  17. }
  18.  
  19. $cont++;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement