Echo php string into onclick as arg
<p>I have an html onclick that calls a javascript function below:</p>

<pre><code>onclick="addInventory(&lt;?php echo $product['id']?&gt;)"
</code></pre>

<p>Once I add a second arg which is a string, the function breaks, I believe
I have put it in quotes but I'm not sure how.</p>

<p>Breaks using:</p>

<pre><code>onclick="addInventory(&lt;?php echo $product['id']?&gt;,&lt;?php echo $product['name']?&gt;)"
</code></pre>