RE: String -> Number Automatic Conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> Possible work-around:
> I suspect that
> $p1[14] = "-0.15" + 0;
> will do what you want, since the leading 0 will probably 
> trigger the regex properly.
> 
> Try it and see.

Changing it to -0.15 + 0 works.  This data is actually coming from a numeric field in an Oracle database using the OCI interface so I am not sure why it's a string instead of a number but that's a separate issue I need to look into.


> 
> PS You should probably have posted the PHP version and 
> whatnot as well, as I wouldn't be surprised if the bug is 
> version-specific...
> 
>

Ah... Yes, I meant to include that information:

HP-UX: 11.11
PHP:   4.3.9 


Art Nuzzo

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux