title: echo select option data attribute value after form submit
body: <p>I have a form that have select tag which i need to print the data-course attribute for the multiple options that the user selected after hitting the submit button where the H6 tag is</p>
  
  <pre><code>&lt;h5&gt;Course Selection&lt;/h5&gt;
  
  &lt;?php if ($data_submitted != null) : ?&gt;
     &lt;h6&gt;&lt;?php  foreach ($_POST['job_applied'] as $selectedOption) echo $selectedOption."\n"; ?&gt;&lt;/h6&gt;
  &lt;?php else : ?&gt;
     &lt;select name="job_applied" id="multi_limit" multiple="multiple" class="multiselect form-control"&gt;
         &lt;option value="10" data-course="Infromation Technology Course Credit"&gt;Infromation Technology Course Credit(10)&lt;/option&gt;
         &lt;option value="20" data-course="Main Stream Technologies Credit" &gt;Main Stream Technologies Credit(20)&lt;/option&gt;
         &lt;option value="30" data-course="Mechanical Engineering Course" &gt;Mechanical Engineering Course Credit(30)&lt;/option&gt;
         &lt;option value="40" data-course="General Mechanics Course Credit" &gt;General Mechanics Course Credit(40)&lt;/option&gt;
         &lt;option value="50" data-course="Engineering Pro" &gt;Engineering Pro Credit(50)&lt;/option&gt;
         &lt;option value="60" data-course="Master Engineering" &gt;Master Engineering Credit(60)&lt;/option&gt;
     &lt;/select&gt;
  &lt;?php endif; ?&gt;
  </code></pre>