fork(1) download
  1. <?php
  2. $items = array('palto','noski','shapki');
  3. $color = array('red','black','white');
  4. $material = array('kozha','meh','aluminij');
  5.  
  6.  
  7. $i=0;
  8.  
  9. $count=count($items)+count($color)+count($material);
  10.  
  11. while($i<$count){
  12.  
  13. $items_inx = array_rand($items ,1);
  14. $color_inx = array_rand($color,1);
  15. $material_inx = array_rand($material,1);
  16.  
  17. echo $items[$items_inx] . '-' . $color[$color_inx] . '-'.$material[$material_inx]."\n";
  18. $i++;
  19. }
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
palto-black-aluminij
shapki-black-kozha
shapki-red-aluminij
noski-white-aluminij
shapki-black-meh
shapki-red-kozha
palto-white-meh
shapki-black-kozha
shapki-red-kozha