So I am writing out all my code and it is all the way It should be, but for some reason it doesn't seem to want to output anything on the screen like it should...
Can someone please help me out? Thanks
code:
$points_disp = $user_data['points'];
$oneFDigit = substr($points_disp, 0, 1);
$oneSDigit = substr($points_disp, 1, 1);
$oneRange = range(1000, 9999);
$tenFDigit = substr($points_disp, 0, 2);
$tenSDigit = substr($points_disp, 2, 1);
$tenRange = range(9999, 99999);
$hunFDigit = substr($points_disp, 0, 3);
$hunSDigit = substr($points_disp, 3, 1);
$hunRange = range(99999, 999999);
$oneMillionFD = substr($points_disp, 0, 1);
$oneMillionSD = substr($points_disp, 1, 1);
$oneMillionRange = range(999999, 9999999);
if ($points_disp < 1000){
echo $points_disp;
} else if (in_array($points_disp, $oneRange)){
echo $oneFDigit . "." . $oneSDigit . "k";
} else if (in_array($points_disp, $tenRange)){
echo $tenFDigit . "." . $tenSDigit . "k";
} else if (in_array($points_disp, $hunRange)){
echo $hunFDigit . "." . $hunSDigit . "k";
} else if (in_array($points_disp, $oneMillionRange)){
echo $oneMillionFD . "." . $oneMillionSD . "m";
}
else{ echo "no output found"; }if none of your condition is true !!