How to write the php code in js file
<p>Is my program i divide the pages as a div in the first div i added this code</p>

<pre><code>  &lt;?php
    $table="am_users";
    $query="select distinct(`user_email`) from $table";
    $result=mysql_query($query);
    $num_rows = mysql_num_rows($result);
     while($data1=mysql_fetch_array($result))
     {
     $data[]=$data1['user_email'];
     }
     sort($data);  
     foreach($data as $search_term) 
     { 
     $js_data[] ="\"" . $search_term . "\""; 


    }  
&lt;script type="text/javascript"&gt;
var collection = [&lt;?php echo implode($js_data, ","); ?&gt;]; 
&lt;/script&gt;   
     ?&gt; 
</code></pre>

<p>below this i include my css file

but division 1 is working in division 2 the css is not applied . This Problem is due to the div 1 had Js variable value If I remove the  
    var collection = []; 
       statement then  the css working fine . So Is It possible to pass the value from PHP  file to JS file On Loading Time</p>
