PHP Classes

Result is null

Recommend this page to a friend!

      Round Robin Class  >  All threads  >  Result is null  >  (Un) Subscribe thread alerts  
Subject:Result is null
Summary:result of the class is nothing
Messages:2
Author:jos venes
Date:2023-03-17 07:41:22
 

  1. Result is null   Reply   Report abuse  
Picture of jos venes jos venes - 2023-03-17 07:41:22
i got it always working, but now it doesnt?!
result of vardump is:
object(roundrobin)#1 (13) { ["finished"]=> NULL ["error"]=> NULL ["matchdays_created"]=> NULL ["raw_matches_created"]=> NULL ["matchday_count"]=> NULL ["free_ticket"]=> NULL ["free_ticket_identifer"]=> NULL ["match_pointer":"roundrobin":private]=> NULL ["matchday_pointer":"roundrobin":private]=> NULL ["teams":"roundrobin":private]=> NULL ["teams_1":"roundrobin":private]=> NULL ["teams_2":"roundrobin":private]=> NULL ["matches"]=> NULL }

Do you know what happend?

  2. Re: Result is null   Reply   Report abuse  
Picture of jos venes jos venes - 2023-03-17 08:17:35 - In reply to message 1 from jos venes
Its this lines, that doesnt work/the rest works as well:

$roundrobin = new roundrobin($teams);

// Generated matches with matchdays and free tickets - because we have an uneven number of teams
echo "<h3>Generated matches with matchdays and free tickets</h3><br />";
$roundrobin->free_ticket_identifer = "FREE TICKET"; //default is "free ticket"
$roundrobin->create_matches();

// Did everything went right?
if ($roundrobin->finished) {
$i = 1;
//Ok, iterating over the matchdays...
while ($roundrobin->next_matchday() !== false) {
echo "-------Matchday ".$i."-------<br />";
//...and the matches of one match day
while ($match = $roundrobin->next_match()) {
echo $match[0]." <b>vs</b> ".$match[1]."<br />";
}
$i++;
echo"<br />";
}
}