Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. $zbior_f = array();
  2. $zbior1 = $this->zbiory[0];
  3. for($i = 1; $i < count($this->zbiory); $i++)
  4. {
  5. $zbior2 = $this->zbiory[$i];
  6. for($j = 0; $j < count($zbior1); $j++)
  7. {
  8. $flaga = false;
  9. for($k = 0; $k < count($zbior2); $k++)
  10. {
  11. if($zbior1[$j] === $zbior2[$k])
  12. {
  13. $flaga = true;
  14. }
  15. }
  16. if($flaga === false)
  17. {
  18. if(count($zbior_f) === 0)
  19. {
  20. $zbior_f[] = $zbior1[$j];
  21. }
  22. else
  23. {
  24. $flaga2 = false;
  25.  
  26. for($m = 0; $m < count($zbior_f); $m++)
  27. {
  28. if($zbior1[$j] === $zbior_f[$m])
  29. {
  30. $flaga2 = true;
  31. }
  32. }
  33. if($flaga2 === false)
  34. {
  35. $zbior_f[] = $zbior1[$j];
  36. }
  37. }
  38. }
  39. }
  40. $zbior1 = $zbior_f;
  41. $zbior_f = array();
  42. }
  43. $this->wynik = $zbior1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement