write php inside javascript alert -
i write php inside js in following way
alert(<?php echo __("error-login") ?>);
echo__("error-login")
correlates xml translate in 2 languages with symfony, not work.
how fix this?
you missing quotes in alert()
call.
alert('<?php echo __("error-login") ?>');
Comments
Post a Comment