Problem with inserting variable data into database
Posted: Tue Oct 25, 2011 10:09 am
I separate some data from a page with preg_match_all function. and store the data into $out variable. when I print the data it is ok but when i try to insert the data in the mysql database using it creates following data in the database That is not correct. The name is text type and ltp and chng is float type. Can anyone plz tell me where is the problem?
Code: Select all
mysql_query("INSERT INTO livedata (name, ltp, chng) VALUES ('$out[0][1]','$out[0][2]','$out[0][3]')")Code: Select all
Array[1] 0 0