Posted by noone on 03/01/06 18:50
rass.elma@googlemail.com wrote:
> Hi all
> I fetch the following value from a string (VCAHR(250))colmun in a MySql
> table:
> "300000000000000000000000000000000000000000000000000"
> When I write it out using echo() I get :
> 3E+50
> Appearently the PHP interpreter converts the VCAHR value automatically
> in a float despite the fact that the value is defined as a VCAHR in
> MySql.
> While trying to convert float to string back in PHP using type casting
> or settype() I get always the string "3E+50".
> Does someone know how one can fetch the VCHAR as string?
> Does someone know how to print a formatted float to get the desired
> result? I tried printf() but no success.
> Thansk a lot:-)
> Ramon
try
$variable =strval($data); // get string value of a number
http://us2.php.net/manual/en/function.strval.php
Navigation:
[Reply to this message]
|