I wanted to shorten my numbers by a few , so maximum numbers will be 5.
for example instead of
2.2333333333
it will show
2.23333
I used this code:
echo "<tr><td>".$results['playerName']."</td><td>".$results['Runecraftlvl']."</td><td>".$results['Runecraftxp']."</td><td>".$results['kills']."</td><td>".$results['deaths']."</td><td>".$results['targkills']."</td><td>". $number_format("$Kdr",5)."</td></tr>";
On the last variable
<td>". $number_format("$Kdr",5)."</td>
Works fine, but if user got 0 Kdr or something, it will print this error:
Fatal error: Function name must be a string
Why does it do that? How can it be fixed?
Thanks.
if you add the following line to the top of your file
does it work properly then?
and indeed $number_format() should be number_format()