filtering out array values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there,

I am retrieving some values out of the db and would only like to show those available inside a drop down field. Now I do have 2 arrays which fill the drop down field and one array with the values which should only show up.

Example:
$objects_available = array(3,5,7);


$ob_options = array( 'all available', 'accomodations', 'internet access', 'tour operators', 'restaurants' , 'pubs', 'clubs', 'museums', 'secret spots', 'hotels at the airport');


$ob_values = array(  0, 1, 2, 3, 4, 5, 6, 7, 8, 9);	

Has anybody an idea how to filter just the ones out which are inside the objects available array? I am sure this is possible without any if statements, but just cant come up with a clear programming solution.

Can anybody help with a good solution?

Thank you in advance,

merlin

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux