title: CakePHP redirect function
body: <p>I have the following code that overrides the redirect function in CakePHP:</p>
  
  <pre><code>function redirect($url, $status = null, $exit = true)
  {
      if(is_array($url))
      {
          $url['?'] = 'continue=true';
      }
      else
      {
          $url.= '?continue=true';
      }
      return parent::redirect($url, $status, $exit);
  }
  </code></pre>
  
  <p>However I don't fully understand what the if statement does and what the difference is between the two? I'm hoping to use this function to send a query strings on redirects but need to understand the difference between if <code>$url</code> is an array or not.</p>