|
Posted by Richard Lynch on 09/28/43 11:07
Nuzzo Art-CINT116 wrote:
>> 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.
I'm not certain about OCI or others, but generally PHP database extensions
retrieve all data as text...
At least, the last time I checked on that, that's what it was...
Could be wrong or out of date.
Rarely worry about data type in PHP, once you understand the type juggling
and conversion rules.
--
Like Music?
http://l-i-e.com/artists.htm
Navigation:
[Reply to this message]
|