title: HTML Form Checkbox Can't output values in PHP
body: <p>I am relatively new to HTML and PHP languages. I am making a survey form and using checkboxes to allow the user to select all of the classes they feel were most useful during their time in college. </p>
  
  <p>In my HTML code, I have the following form element:</p>
  
  <pre><code>&lt;table&gt;
      &lt;tr&gt;
          &lt;td&gt;
              &lt;input type="checkbox" name="useful_classes[]" value="Engineering Economics"&gt;
              &lt;td align="left"&gt;Engineering Economics
              &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;
              &lt;input type="checkbox" name="useful_classes[]" value="Operations Research"&gt;
              &lt;td align="left"&gt;Operations Research
              &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;
              &lt;input type="checkbox" name="useful_classes[]" value="Simulation"&gt;
              &lt;td align="left"&gt;Simulation
              &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>And below here is my PHP code that I'm trying to use to make a submission page for them to verify everything they just submitted is correct. I can't figure out how to get the PHP code to output the things like "Engineering Economics, Operations Research" or something like that. No matter what I try from other things I've found on google, none of it works. </p>
  
  <pre><code>&lt;?PHP
              $useful_classes = $_POST['useful_classes'];
  
              print &lt;&lt;&lt;END_PRINT
              &lt;table&gt;
  
                  &lt;tr&gt;
                      &lt;td class="title" align="right" &gt; &lt;b&gt;Most Useful Classes:&lt;/b&gt; &lt;/td&gt;
                      &lt;td class="values" align="left" &gt; 
                          foreach ($useful_classes as $useful_classes){ 
          echo $useful_classes . ", ";
      }
                              /* for($i=0; $i&lt;count($useful_classes); $i++){
                                  echo($useful_classes[$i]);
      if($i !=$N){
                                      echo(", ");
                                  }
                              } */
                      &lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
      END_PRINT;
      ?&gt;
  </code></pre>
  
  <p>Any help is appreciated!</p>