I have a number like this:
12345678987654321
I want to only use the first 5 digits like this:
12345
How would I do that in PHP? number_format
?
Something like substr($number, 0, 5);
would suffice.
$num = "12345678987654321";
$num2 = substr($num, 0, 5);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With