title: How to put PHP array 'x' literally in array 'y'
body: <p>I don't know what's going on, it seems like a have a PHP beginner issue. I want to put the content of the $moduleDetail array (key-value pairs) literally in another array ($url). Here's my attempt:</p>
  
  <pre><code>    $moduleDetail = array();
  
      if (isset($menuItem['Page']['module_detail_slug'])) {
          $moduleDetail['slug'] = $menuItem['Page']['module_detail_slug'];
      }
  
      $url = $this-&gt;Html-&gt;link(
          $menuItem['MenuPageLink']['title'],
          array(
              'controller' =&gt; $menuItem['Page']['ModuleActionModuleController']['ModuleController']['controller'],
              'action' =&gt; $menuItem['Page']['ModuleActionModuleController']['ModuleAction']['action'],
              'pagePath' =&gt; $pagePathString,
              Inflector::variable($menuItem['Page']['ModuleActionModuleController']['ModuleController']['controller']) . 'Controller' =&gt; Inflector::variable($menuItem['Page']['ModuleActionModuleController']['ModuleController']['slug']),
              $moduleDetail,
              'full_base' =&gt; true
          ),
          array(
              'title' =&gt; $menuItem['MenuPageLink']['title'],
              'escape' =&gt; false
          )
      );
  </code></pre>
  
  <p>I thought the output of the variable should become something like this:</p>
  
  <pre><code>$moduleDetail = array();
  
  if (isset($menuItem['Page']['module_detail_slug'])) {
      $moduleDetail['slug'] = $menuItem['Page']['module_detail_slug'];
  }
  
  $url = $this-&gt;Html-&gt;link(
      $menuItem['MenuPageLink']['title'],
      array(
          'controller' =&gt; $menuItem['Page']['ModuleActionModuleController']['ModuleController']['controller'],
          'action' =&gt; $menuItem['Page']['ModuleActionModuleController']['ModuleAction']['action'],
          'pagePath' =&gt; $pagePathString,
          Inflector::variable($menuItem['Page']['ModuleActionModuleController']['ModuleController']['controller']) . 'Controller' =&gt; Inflector::variable($menuItem['Page']['ModuleActionModuleController']['ModuleController']['slug']),
          'slug' =&gt; 'boomerang',
          'full_base' =&gt; true
      ),
      array(
          'title' =&gt; $menuItem['MenuPageLink']['title'],
          'escape' =&gt; false
      )
  );
  </code></pre>
  
  <p>But it constantly returns this error:</p>
  
  <blockquote>
    <p>Warning (2): rawurlencode() expects parameter 1 to be string, array
    given</p>
  </blockquote>
  
  <p>Any ideas? I hope my question won't be downvoted as I can't find a simular question on Google or even on StackOverflow ('Questions that may already have your answer'). Perhaps my search keywords aren't good enough? :)</p>
  
  <p>Thanks for helping!</p>