title: PHP function echo with HTML string
body: <p>I have this function in my HTML body:</p>
  
  <pre><code>      &lt;ul&gt;
          &lt;!-- Dynamic insertion of projects with PHP function --&gt;
          &lt;?php projectGallery(); ?&gt;
        &lt;/ul&gt;
  </code></pre>
  
  <p>And this is the PHP function itself: </p>
  
  <pre><code>// This function shows a list of projects on our home page
  function projectGallery(){
      include 'includes/config.php';
      $result = mysqli_query($con,"SELECT * FROM project");
  
      while($row = mysqli_fetch_array($result)) {
  
          echo "&lt;li&gt;
                    &lt;a href='#' data-reveal-id='".$row['project_id']."' data-animation='fade'&gt;
                      &lt;div class='project'&gt;
                        &lt;img class='project_image' src='images/upload/".$row['project_afbeelding']. "' /&gt;
                          &lt;h2 class='title'&gt;".$row['project_titel']."&lt;/h2&gt;
                      &lt;/div&gt;
                    &lt;/a&gt;
               &lt;/li&gt;" ;
  
      };
  };
  </code></pre>
  
  <p>Well, if you're still reading despite the ugliness... My question is, would there be a cleaner way to write this echo part? Without the endless HTML string.</p>