title: Redirect with array parameter Cakephp
body: <p>I'm working on a Cakephp project, I have one controller that made some algorithms and save information to an array. I need to call another method on that same controller and send the array as a parameter. I need to do this using redirect, just like this:</p>
  
  <pre><code>return $this-&gt;redirect(['controller' =&gt; 'Identities', 'action' =&gt; 'myMethod', $array]);
  </code></pre>
  
  <p>If I don't use redirect, I will not have the view of the myMethod, and I need it, but I need to have the array information on that view, something like doing $this->set to pass the array to a view.</p>
  
  <p>However, I get this error:</p>
  
  <pre><code>rawurlencode() expects parameter 1 to be string, array given
  </code></pre>
  
  <p>How can I send the array as a parameter?</p>