Hashes

From: Date: Fri, 21 Dec 2001 16:27:01 +0000
Subject: Hashes
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-15184@lists.php.net to get a copy of this message
I'm trying to use a hash to translate a value into something human readable. I know how to do this with an if-else but that seems like a waste of typing. I have a bunch of items in the db and their values are abbreciations such as 'm_r'. I want m_r to show on the page as "Mens Rings". I was trying to do it like this but echo $item returned "Array": <?php #query db and get a result snipped $item = $row[item]; $item = array('Mens Ring' => m_r, 'Mens Charm' => m_c, 'Womens Ring' => w_r,'Womens Charm' => w_c); echo $item; ?> Any help would be appreciated. thnx, robert

« previous php.db (#15184) next »