Jump to content

foreach


karimali831

Recommended Posts

Hi!

 

When I echo $m below, it will show all selected options fine.

Instead, I want it to show many I selected.

 

So if I selected 3 in dropdown, I want it to say I selected 3 instead of showing their values.

 

      $allmaps=$_POST['maps'];

      foreach ($allmaps as $m) { echo 'm = '.$m.''; }

 

<select name="maps[]" multiple>'.$maps.'</select>

 

 

Link to comment
https://forums.phpfreaks.com/topic/210287-foreach/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.