You are here: RE: [PHP] String -> Number Automatic Conversion « PHP « IT news, forums, messages
RE: [PHP] String -> Number Automatic Conversion

Posted by Nuzzo Art-CINT116 on 10/02/67 11:07

>
> 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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация