I seem to be having an issue, I have a Javascript code,and it contains php variables
<?php // Database information
$name="whatever";
$mp3 = "Link/to/track/";
echo "
var myPlaylist = [{
mp3:'mix/4.mp3',
title:'$name',
}]]; </script>";
Upon trying to encode this,I'm able to encode the Javascript part, but it displays my variable names (in this instance $name) instead of the value(whatever)
title:'" . $name . "'