There are number ‘2352362361 ‘, as it is separated by spaces from the end of 3 characters?
The output should obtain ‘2 352 362 361 ‘
There are number ‘2352362361 ‘, as it is separated by spaces from the end
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you have that number as a string :
You can first convert that string to an integer, using
intval:And, then, use
number_formaton that integer :And you get :
(If the space at the end was intentional, you can add it back if necessary)
And
number_formatwill also work even if you pass it the string without converting it to an integer first :