I am wondering if there is any way to call a javascrip function from php and store the return value of the function in php variable.
Something like:
<?php
var p = test("something");
echo p;
?>
<script>
function test(elm){
return elm+" anotherthing";
}
</script>