title: How to change this error message into alert pop up in php?
body: <p>I want to modify this code into pop up alert. Currently, this code only produce error message. I want to modify it so when course clashed, the pop up will appear</p>
  
  <pre><code> if($clash_courses==1)
  {
      $error_msg .= 'Course ';
      $c = 0;
      foreach($course_id as $id){
          $c++;
          $error_msg .= $id;
          if($c&lt;count($course_id))
          $error_msg .= ' and ';
      }
  
      $error_msg .= ' have clashed.';
  
  }   
  </code></pre>