title: Script works with PHP 5.4.16, but not PHP 5.3.3... where is the faulty code?
body: <p>I'm a beginner in php, and... I was just trying to create this... dynamic indexing/document_display script using php... What I was trying to do isn't really important to the question, however. The thing is... my script does exactly what I want it to do, when hosted on a WAMP server with php 5.4.16... but when uploaded to a LAMP server with php 5.3.3, I get the error</p>
  
  <blockquote>
    <p>Fatal error: Can't use function return value in write context in
    /users/clentz/testphpindex.php on line 34</p>
  </blockquote>
  
  <p>I need it to work on this lamp server.</p>
  
  <p>Can anyone tell me what about the following code is causing errors with the php 5.3.3 interpreter?</p>
  
  <pre><code>&lt;?php
  
  $courses_directory = "./Courses";
  $courses_array = scandir($courses_directory);
  
  if (empty($_SERVER['QUERY_STRING']))
  {
      include 'Misc/common_components/headers/index_header.html';
  
      echo "\r\n\t&lt;h1&gt;Enrolled Courses&lt;/h1&gt;";
  
      for ($uwmi_loop_var = 2; isset($courses_array[$uwmi_loop_var]); $uwmi_loop_var++)
      {
          if ($uwmi_loop_var == 2)
          {
              echo "\r\n\t&lt;ul&gt;";
          }
  
          if (isset($courses_array[$uwmi_loop_var]))
          {
              echo "\r\n\t\t&lt;li&gt;" . '&lt;a href="?' . $courses_array[$uwmi_loop_var] . '"&gt;' . $courses_array[$uwmi_loop_var] . '&lt;/a&gt;&lt;/li&gt;';
          }
  
          if (!isset($courses_array[($uwmi_loop_var + 1)]))
          {
              echo "\r\n\t&lt;/ul&gt;\r\n";
          }
      }
  
      include 'Misc/common_components/footer.html';
  }
  
  else if (!empty($_SERVER['QUERY_STRING']))
  {
      for ($uwmi_loop_var = 2; isset($courses_array[$uwmi_loop_var]); $uwmi_loop_var++)
      {
          if (explode("&amp;",$_SERVER['QUERY_STRING'])[0] == rawurlencode($courses_array[$uwmi_loop_var]))
          {
              include "./Courses/" . $courses_array[$uwmi_loop_var] . "/index.php";
          }
      }
  }
  
  
  
  ?&gt;
  </code></pre>
  
  <p>If it helps, you can see the code in a little more visually appealing format at: <a href="http://charleselentz.com/fault.png" rel="nofollow">pic of the code in a visually appealing format</a></p>