Arrays/Hashes

From: Date: Tue, 18 Dec 2001 16:23:36 +0000
Subject: Arrays/Hashes
Groups: php.general 
Request: Send a blank email to php-general+get-78080@lists.php.net to get a copy of this message
Hey there, sortta simple question... Is it just me or can't you access hashes within strings? This works... print("Some text $myarray[0]<BR>\n"); This doesn't print("Some text $myhash['mykey']<BR>\n"); i'm asking in relation to databases (not that that matters). If i fetch a row from the database I can use the $array[0], [1], etc in the print statements if i use mysql_fetch_array (oh sorry, u people call it associative arrays instead of hashes, my mistake) i can't access $array['fieldname'] from within a print statement but I CAN do $DBID = $resultarray['idfieldname']; and then use $DBID..... regards

« previous php.general (#78080) next »