title: array_sum() expects parameter 1 to be array
body: <p>Need someone to help me to crack the following. </p>
  
  <p>On my local machine, i'm running MAMP on my Mac. I have the following code:</p>
  
  <pre><code>   $x=0;
     for ($i=0; $i&lt;=30; $i++) {
         $VoteValue[$x] = $i;
         $x++;
     }
  
     $Total = array_sum($VoteValue);
     echo "&lt;br /&gt;&lt;br /&gt;Total Vote = $Total &lt;br /&gt;";
  </code></pre>
  
  <p>The above code works and run fine on my local machine. But, when I uploaded it to my production server, I get the following warning prompts:</p>
  
  <pre><code>Warning: array_sum() expects parameter 1 to be array, null given in /home/RIP/public_html/RIPVote.php on line 7
  </code></pre>
  
  <p>and it doesn't return and show the output value due to the warning error. How do i get rid of this?</p>
  
  <p>Please advice and looking forward to hear from you guys soon. Appreciate and thanks.</p>