Just want to ask a question if this is possible ?
$('element').each(function(){
var name = $(this).attr('name');
var n = name.replace(/-/g, '_');
var ep = '<?php echo $user_quest1["'+n+'"]; ?>';
alert(ep);
});
I got nothing.. Is there a way to do that?
Thanks
It’s must keep in mind that PHP execute on server side, while javascript on client side. It mean, when client request a web page, server will process the request (PHP will execute during this process). After this process finished, it will be sent to client browser and then execute javacript code.