Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $zbior_f = array();
- $zbior1 = $this->zbiory[0];
- for($i = 1; $i < count($this->zbiory); $i++)
- {
- $zbior2 = $this->zbiory[$i];
- for($j = 0; $j < count($zbior1); $j++)
- {
- $flaga = false;
- for($k = 0; $k < count($zbior2); $k++)
- {
- if($zbior1[$j] === $zbior2[$k])
- {
- $flaga = true;
- }
- }
- if($flaga === false)
- {
- if(count($zbior_f) === 0)
- {
- $zbior_f[] = $zbior1[$j];
- }
- else
- {
- $flaga2 = false;
- for($m = 0; $m < count($zbior_f); $m++)
- {
- if($zbior1[$j] === $zbior_f[$m])
- {
- $flaga2 = true;
- }
- }
- if($flaga2 === false)
- {
- $zbior_f[] = $zbior1[$j];
- }
- }
- }
- }
- $zbior1 = $zbior_f;
- $zbior_f = array();
- }
- $this->wynik = $zbior1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement