The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Turn PHP into CSS Drop Box Reply To: Turn PHP into CSS Drop Box


As @traq mentioned above, show us the data contained within $genres.

But in general, PHP foreach loop:

$numbers = array(1,2,3,4,5); foreach( $numbers as $number ) { echo $number; }; /* Result: 12345 */ $associates = array( 'president' => 'Jane Doe', 'assistant' => 'Joe Blow', ); foreach($associates as $role => $name) { echo $name . ', ' . $role . '<br/>'; }; /* Result: Jane Doe, president Joe Blow, assistant */

You can test your code online using

Hope that helps.