xxxxxxxxxx
// you can read more here
'
https://stackoverflow.com/questions/23740548/how-do-i-pass-variables-and-data-from-php-to-javascript
'
// No, you can't send data directly but there are wayarounds.
// There are actually several approaches to do this.
// Some require more overhead than others,
// and some are considered better than others.
// In no particular order:
// 1. Use AJAX to get the data you need from the server.
// 2. Echo the data into the page somewhere, and use JavaScript to get the information from the DOM.
// 3. Echo the data directly to JavaScript.