0
call php function in js
i need to call php func in js with pass parameter(js variable) to func: this worked: let fulld = "<?= gregorian_to_jalali('2023', '10', '2', '/'); ?>"; but for this i got syntax error: syntax error, unexpected token ";" let year = date.getFullYear(); let fulld = "<?= gregorian_to_jalali(?>"+year+"<?, '10', '2', '/'); ?>"; what is problem?
1 Antwort
+ 2
Write php inside this <?php ?>
you cannot use JavaScript variable in Php script