|
-
June 26th, 2012, 02:38 PM
#1
Problem with variable being cast to int
I get a float value from a xml file and I assign this value to a variable
$value = 13.80;
When I do number_format($value,2,".",","); I get NULL. Any ideas why?
When I try echo empty($value) ? '0' : $value; I get 13.80 showing it´s not null/empty.
I am using PHP 5.3.13
Last edited by rogernem; June 26th, 2012 at 04:37 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|