De Necker Henri wrote:
> Hi there.
> I have an array like this : 1.2 , 0.3 , 0.5 , 1.6 , 0.3
> I output like this:
> echo "<br>$data[$j]" ;
> $j++ ;
> My output is like this : 1 , 0 , 0 , 1 , 0
> The values in the db are floats and are read correctly !
> Why is the values not there.Is there a specific way to store values in a
Dav's answer is rather meaningless -- There *IS* no way to define the
data-type of the array contents, nor of any variable in PHP. PHP is a
DATA-typed language, not VARIABLE-typed. The data itself *KNOWS* its type.
I'm guessing that whatever you are doing to get the data out of the
database is getting integers. Show us that code, or post your entire
Also, how do you *KNOW* the values in the database are 1.2, 0.3, .... Can
you see those values with some other tool? Which database are you using?
Like music? http://l-i-e.com/artists.htm
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]