How to get value to array in javascript
<pre><code>$array = array("1" =&gt; "box of chocolates", "2" =&gt; "mylar balloons", "3" =&gt; "stuffed animals");
    &lt;?php 
                $productWithItem = $array;
                foreach ($productWithItem as $pwi) {
                ?&gt;
                    &lt;a href="#" id="product_name"&gt;&lt;?php echo $pwi-&gt;name ?&gt;&lt;/div&gt;&lt;/a&gt;
                &lt;?php    
                }
                ?&gt;
    &lt;script type="text/javascript"&gt;
    jQuery(function(){
        var value_array = ?;
    });
    &lt;/script&gt;
</code></pre>

<p>I Want get array value from id="product_name", but I don't know get value from on this javascript, you can help me, thank you</p>
