title: CakePHP: Include js file in header from view
body: <p>The cakephp docs say:</p>
  
  <blockquote>
    <p>By default, script tags are added to the document inline. If you override this by setting $options['inline'] to false, the script tags will instead be added to the script block which you can print elsewhere in the document.</p>
  </blockquote>
  
  <p>So in my view file (.ctp) I have:</p>
  
  <p><code>echo $this-&gt;Html-&gt;script('//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js', array('inline' =&gt; 'false'));</code></p>
  
  <p>And in my layout, in the head tag:</p>
  
  <p><code>echo $this-&gt;fetch('script');</code></p>
  
  <p>But the script tag prints out inline and not in the head.  If I miss of the echo from the line in my view file, the script doesn't print out at all in my html.</p>
  
  <p>Any help would be gratefully received.</p>
  
  <p>PAE</p>