#PHP Varible to JS
On your .php
file, for example:
$var = 'My PHP variable';
echo $var;
And in our .js
file we'll make a POST to get the data from PHP:
$.post('file.php', function(data) {
alert( data );
});
#PHP Varible to JS
On your .php
file, for example:
$var = 'My PHP variable';
echo $var;
And in our .js
file we'll make a POST to get the data from PHP:
$.post('file.php', function(data) {
alert( data );
});