title: Fatal Error: Function name must be a string PHP Function
body: <p>Can anyone help? I am getting the following error: Fatal Error: Function name must be a string in .... on line 120</p>
  
  <p>Here is the code - it looks fine to me, but maybe a second pair of eyes? I will highlight line 120. </p>
  
  <pre><code>function display($name, $display_name, $id, $package_results, $payment_type, $before_percent_box, $before_price_box, $after_percent_box, $after_price_box, $min_price_box)
  {
      LINE 120 -&gt; $records = $mysql_num_rows($package_results);   
  
      if ($records &gt; 0)   //If there are records
      {
          while($package_row = mysql_fetch_assoc($results))
          {
  
          }
      }
      else    //If there were no records found
      {
          if ($payment_type == 1)     //If it is a PAYG
          {
              createPricePackageTable($name, $display_name, $id, "", $before_percent_box, $before_price_box, $after_percent_box, $after_price_box, $min_price_box, $records, 1);  //Create one blank table, 1 month
          }
          else    //If it is any other payment type other than PAYG
          {
              createPricePackageTable($name, $display_name, $id, "", $before_percent_box, $before_price_box, $after_percent_box, $after_price_box, $min_price_box, $records, 2);  //Create two blank tables, 6 and 12 months 
          }
      }
  }
  </code></pre>
  
  <p>I have also includes the code leading up to the calling of the above function: </p>
  
  <pre><code>function build($name, $id, $memberid, $results) 
  {
      echo "&lt;div class='popup-column' style='width: 100%;'&gt;";
          echo "&lt;h3&gt;Payment Option " . $memberid . "&lt;/h3&gt;";
  
          echo "&lt;p&gt;Which payment options do you offer?&lt;/p&gt;";
  
          echo "&lt;div class='payment-options'&gt;";
              $payment_type = 0;
  
              $display_name = $name;      //Get the name of the Payment Type
              $name = str_replace(" ", "", $name);
  
              $disable  = 'readonly="readonly" class="readonly"';
              $before_percent_box = '';   //Setup variables to hold whether a input box is disabled or not
              $before_price_box = '';
              $after_percent_box  = '';
              $after_price_box  = '';
              $min_price_box    = '';
  
              switch($name)   //Disable some input box fields
              {
                  case "Split1" :
                      $payment_type = 5;
  
                      break;
  
                  case "Split2" :
                      $payment_type = 6;
  
                      break;
  
                  case "Fixed1" :
                      $payment_type = 3;
  
                      $before_percent_box = $disable;
                      $after_percent_box  = $disable;
                      $after_price_box  = $disable;
                      $min_price_box    = $disable;
  
                      break;
  
                  case "Fixed2" :
                      $payment_type = 4;
  
                      $before_percent_box = $disable;
                      $after_percent_box  = $disable;
                      $after_price_box  = $disable;
                      $min_price_box    = $disable;
  
                      break;
  
                  case "PAYG" :
                      $payment_type = 1;
  
                      $before_percent_box = $disable;
                      $after_percent_box  = $disable;
                      $after_price_box  = $disable;
                      $min_price_box    = $disable;
  
                      break;
  
                  case "Commission" :
                      $payment_type = 2;
  
                      $before_percent_box = $disable;
                      $before_price_box = $disable;
  
                      break;
              }
  
              displayPackagePricesTable($name, $display_name, $id, $results, $payment_type, $before_percent_box, $before_price_box, $after_percent_box, $after_price_box, $min_price_box);    //Display the table with the prices
  </code></pre>
  
  <p>...</p>