After I made some changes on my records system,
I'm having some problems, this is the code:
Code: Select all
while ($count != 0) {
if ($playerfinish['login'] == $record["$count"][1]) {
if ($playerfinish['timee'] < $record["$count"][0]) {
$record["$count"][0] = $playerfinish['timee'];
$result = $record;
}
}
$count-- ;
if ($count === 0) {
$arraybanaan = array(array("0" => $cb[1][2], "1" => $cb[1][1]));
$result = array_merge($record, $arraybanaan);
break;
}
}
print_r($result);
$arraykiwi = array("0" => $cb[1][2], "1" => $cb[1][1]);
sort($result);
$recordnumber = array_search($arraykiwi, $result);
$recordnumber++;
print_r returns an array (just to make sure, it'll be remove once this stuff works again)
but sort($result) returns a warning that $result is not an array
array_search($result) works fine and returns the correct key
I'm not getting the problem. On some line's $result is an array, on others it isn't..
