Hack Forums
[PHP] Simple String Formatting Question - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Web Development (https://hackforums.net/forumdisplay.php?fid=183)
+---- Thread: [PHP] Simple String Formatting Question (/showthread.php?tid=4100114)



Simple String Formatting Question - Nozemi™ - Mar 6, 2014

I was just wondering how I can insert characters into a string, but it has to cont from the end of the string and forward.

The actual task is:
10000000 to 10 000 000

Thanks for any help! Would be much appreciated!

Nozemi


* - RedWaters - Mar 6, 2014

PHP Code

<?php 
$num 
= 1000000; //don't know why the hf editor remove a 0 lol
echo number_format($num,0,'',' '); 



* - Nozemi™ - Mar 6, 2014

(Mar 6, 2014 02:06 PM)xSplit Wrote:  
PHP Code

<?php 
$num 
= 1000000;
echo 
number_format($num,0,'',' '); 

That was very simple haha, thanks for your help! Much appreciated!