PHP: Get thousand from number -


When a user enters more than 1000 numbers, I want to get thousands for that number in an array.

For example:

The number entered by the user: 165124

should return my array:

  Array ('thousand_low' => 165000, 'thousand_hag' = 165 99 99)   

Thank you! Get_thousands ($ num) {return array ('thousand_low' = & quot;

 Gt; floor ($ num / 1000)) * 1000, 'thousand_hag' = & gt; Terrace ($ num / 1000) * 1000-1); }    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -