Searching and getting values out of array maps
| From: | Jonas Rosling | Date: | Wed, 03 May 2006 12:52:57 +0000 |
| Subject: | Searching and getting values out of array maps | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-235356@lists.php.net to get a copy of this message | ||
Hi all,
I'm kind of new with PHP. I work alot with another language called Lasso,
reminds kind of PHP but not the same.
I trying to search after a desired value within an array map (think you call
it like that in PHP) and to get the value out as well.
Is this possible in any way? Like to show you how it works in Lasso while
I'm talking about.
Could look like this:
<?LassoScript
var: 'colors'=(map: 'red'='#ff0000',
'green'='#00ff00','blue'='#0000ff');
output: $clors->(find: 'blue');
?>
The result you get is #0000ff.
Can you do something like this with PHP. Would help me alot if anyone could
help me out a bit.
Thanks in advance // Jonas