How to properly echo PHP variables within JS script?
<p>I have this script that needs to print and it is within a PHP file as I need to pass it options because I am using the jQuery UI Tabs plugin.</p>

<p>Here is what I have:</p>

<pre><code>&lt;?php 
$collapsible = "true";
$active = "2";

$options = array( 'collapsible' =&gt; $collapsible, 'active' =&gt; $active );
?&gt;
    &lt;script type="text/javascript"&gt;
        jQuery(document).ready(function() {
            jQuery( '.tabs' ).tabs({
                collapsible : &lt;?php echo $options["collapsible"]; ?&gt;,
                active : &lt;?php echo $options["active"]; ?&gt;
            });
        });
    &lt;/script&gt;
</code></pre>

<p>Ok so everything works however the two options collapsible and active isn't effecting it.  But if I bypass the php variables and just hardcode the option settings in for collapsible and active, then it works.  So I am not sure why the variables have no effect.  I've even tried type casting it with (int) for active and (bool) for collapsible but still no dice.</p>

<p>Thanks for looking.</p>
