title: PHP explode() not working
body: <p>I am a beginner to php and i have some trouble with the explode() function.</p>
  
  <pre><code>if (isset($_GET["url"])) {
          $url = $_GET["url"];
          $url = explode("/", $url);
          echo $url;
          $controller = $url[0];
          $action     = $url[1];
      } else {
          $controller = "pages";
          $action     = "home";
      }
  </code></pre>
  
  <p>I am typing in the url "localhost/pages/home" and the echo is just printing "Array" as if it's empty. If i echo the $url before using the explode function it comes out as "pages/home". Thanks in advance.</p>