https://www.php-resource.de/forum/php-developer-forum/85932-php-variable-in-java-script-verwenden/page2