How to pass Jquery variable to php variable?
<pre><code>&lt;script&gt;

// i want to extract time '10:30' from stime jquery string variable 
// and transfer value "10:30" in a php variable in this format "10, 30"

var stime = 'Sat Dec 17 2011 10:30:00 GMT+0530 (India Standard Time)';

&lt;?php    
  $s = "&lt;script&gt;document.write(stime);&lt;/script&gt;";    
  $e = "&lt;script&gt;document.write(etime);&lt;/script&gt;";    
  $stime = substr($s,15,6);
 //substr_replace(string,replacement,start,length) 
  $convert_stime = substr_replace($stime,", ",3,1);
?&gt;    
&lt;/script&gt;

/**
 Output Will Be
 --------------
 Time: 10:30
 Converted Time: 10, 30
***/
</code></pre>
