How to pass php variable as a parameter in a JS function call

2

Hello, I want to pass a php variable, as a parameter in a JavaScript function call. This way:

<a href="calcular($numero)">Calcular</a>

I have tried to do this:

<a href="#">#                    
asked by anonymous 01.10.2016 / 22:04

1 answer

1

You can simply use concatenation, without using <?php . Something like this: <a href="#">#

01.10.2016 / 22:15