How to read php array of string in javascript
<pre><code>var longitudeArray = new Array(&lt;?php $result = count($longitudeArray);
                                    if ($result &gt; 1){
                                    echo implode(',', $longitudeArray); 
                                    } else {
                                    echo $longitudeArray[0];
                                    }
                                    ?&gt;);
</code></pre>

<p><code>$longitudeArray</code> contain array of number like: <code>$longitudeArray = array(23.54545, 2323.32);</code>
Above script create following javascript array:</p>

<pre><code>var longitudeArray = new Array(12.32444,21.34343,23.5454);
</code></pre>

<p>but if i passes string in <code>$longitudeArray</code> like:</p>

<pre><code>$longitudeArray = array('one', 'two');
</code></pre>

<p>instead of integer value in <code>$longitudeArray</code> then my javascript array is not creating properly or its not working.</p>
