title: Parse error on explode
body: <p>I am getting a parse error for this and have no idea why</p>
  
  <pre><code>&lt;?php
  class api{
      //$api_Key;
      public function getURL($url){
          return file_get_contents($url);
      }
      public function postURL($url){
          $data = array();                                                                    
          $data_string = json_encode($data);   
          $ch = curl_init( $url );
          curl_setopt( $ch, CURLOPT_POST, 1);
          curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true);
          curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
          curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
          $response = curl_exec( $ch );
          print curl_error($ch);
          echo curl_getinfo($ch, CURLINFO_HTTP_CODE);
          curl_close($ch);
          return $response;
      }
  } 
  class geo extends api{
      public function getLocation(){
          return $this-&gt;getJSON($this-&gt;postURL("https://www.googleapis.com/geolocation/v1/geolocate?key="));
      }
  }
  class vote extends api {
      private $key = "";
      //private $cordinates = $_COOKIE["cord"];
      private $cookie = explode(',',$_COOKIE['cord']);
      function getElections(){
          return $this-&gt;getJSON($this-&gt;postURL("https://www.googleapis.com/civicinfo/v2/elections?fields=elections&amp;key=$key"));
      }
      function getLocationInfo(){
          $lat = $cookie[0];
          $long = $cookie[1];
          return $this-&gt;getJSON($this-&gt;postURL("https://maps.googleapis.com/maps/api/geocode/json?latlng=".$lat",".$long."&amp;key=$key"));
      }
      function getDivision(){
  
      }
  }
  
  ?&gt;
  </code></pre>
  
  <p>This is the line the error is on </p>
  
  <pre><code>private $cookie = explode(',',$_COOKIE['cord']);
  </code></pre>
  
  <p>This is the error </p>
  
  <blockquote>
    <p>Parse error: syntax error, unexpected '(', expecting ',' or ';' in G:\wamp\www\voting\php\vote.php on line 30</p>
  </blockquote>
  
  <p>I have looked at the documentation and around this site and the syntax look right but still cant get past this error</p>
  
  <pre><code>&lt;?php
      include("/php/vote.php");
      $vote = new vote;
      $vote-&gt;getLocationInfo();
      //echo $_COOKIE["cord"];
      ?&gt;
  </code></pre>