hi I want to searcg for zip for latitude and longitude and store that in user table $m11 = myF(myQ("SELECT latitude,longitude FROM `[x]zipcode` WHERE `zip_code`=501")); $lat=m11["latitude"]; $lat2=m11["longitude"]; function myQ($content) { global $CONF; if (!isset($GLOBALS["MYSQL_CONNECTION"]) or !$GLOBALS["MYSQL_CONNECTION"]) myConnect(); return mysql_query(str_replace("[x]", $CONF["MYSQL_DATABASE_TABLES_PREFIX"], $content)); } Can anybody tell me where i am wrong
You forgot to add a dollar sign ($) in front of you variables. Link to php.net explanation of variables. Try using these to call your array instead. $lat=$m11["latitude"]; $lat2=$m11["longitude"]; $lat=$m11->latitude; $lat2=$m11->longitude; Code (markup):