pass a variable to jquery function and get returned value in php
-
Actually I have defined a jquery function this
[ Moderator Note: Please post code or markup snippets between backticks or use the code button. ]
<script language="JavaScript" type="text/javascript"> jQuery(document).ready(function convertcurrency($){ var temp; temp=$('#hotel-description table>tbody>tr>.test').html(); console.log(temp); return temp; }); </script> Now I am calling the same function in php like this <?php $t="some value" $temp2=convertcurrency($t); echo $temp2;?>
I have kept the $ sign in jquery function otherwise its showing error
$(“#hotel-description table>tbody>tr>.test”) is nullwhen I am keeping the $ sign there the console displaya the value of temp accurately.
Please help the replier will be greatly appericiated.
thanks
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘pass a variable to jquery function and get returned value in php’ is closed to new replies.