Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $samePoints = array();
- for ($a = 0; $a < count($lestvica); $a++) {
- for ($b = $a + 1; $b < count($lestvica); $b++) {
- if($lestvica[$a]->tocke == $lestvica[$b]->tocke) {
- $points = $lestvica[$a]->tocke;
- if(!isset($samePoints[$points])) {
- $samePoints[$points] = [];
- }
- if(!in_array($samePoints[$points], $lestvica[$a]->ekipa_id)) {
- array_push($samePoints[$points], $lestvica[$a]->ekipa_id);
- }
- if(!in_array($samePoints[$points], $lestvica[$b]->ekipa_id)) {
- array_push($samePoints[$points], $lestvica[$b]->ekipa_id);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement