0
The idea is this below, but it is not working when I put the value of the php variable in javascript, for example-3,3462, -60,6790
It works, you know what it could be?
<?php
$variavel = "-3,3462, -60,6790";
?>
<script>
var testMarker = L.marker([<?php $variavel;?>],{icon: orangeIcon});
</script>
Attention you when passing the value
[-3,3462, -60,6790]
will take the followingArray [ -3, 3462, -60, 6790 ]
– lazyFox
Possible duplicate of How to use a PHP variable in javascript?
– Jéf Bueno
Possible quintuplicate...
– Jéf Bueno