JavaScript and PHP in code - whats the difference?
<p>I have this code in my JavaScript part:</p>

<pre><code>var opConfig = new Product.Options(&lt;?php echo $this-&gt;getJsonConfig(); ?&gt;);
</code></pre>

<p>The PHP call returns me some string, to make it easy, lets say the string is <em>abcd</em>. So this code results in:</p>

<pre><code>var opConfig = new Product.Options(abcd);
</code></pre>

<p>Now, some lines later, I have this code:</p>

<pre><code>this.opConfig = new Product.Options(opconfig);
</code></pre>

<p>The <code>opconfig</code> variable has the same string <code>abcd</code>, but the results are different, <code>this.opConfig</code> does not look like it looked before. So is there a difference in how I use the string as param? Something I am missing? For me, it should always be the same call, namely:</p>

<pre><code>new Product.Options(abcd)
</code></pre>

<p>Ideas?</p>

<p><strong>Addition:</strong> The full call in the JS code looks like that:</p>

<pre><code>var opConfig = new Product.Options({"16":{"26":{"price":5,"oldPrice":5,"priceValue":"5.0000","type":"fixed","excludeTax":5,"includeTax":5},"28":{"price":8,"oldPrice":8,"priceValue":"8.0000","type":"fixed","excludeTax":8,"includeTax":8},"27":{"price":10,"oldPrice":10,"priceValue":"10.0000","type":"fixed","excludeTax":10,"includeTax":10}},"14":{"price":0,"oldPrice":0,"priceValue":"0.0000","type":"fixed","excludeTax":0,"includeTax":0},"15":{"price":0,"oldPrice":0,"priceValue":"0.0000","type":"fixed","excludeTax":0,"includeTax":0}});
</code></pre>

<p>The param reaches the called function as object, no idea why. Calling it the other way, the same string seems to reach it as string. Can anybody help?</p>
