First of all I'm new here and new in the programming business. :)
So my problem:
I have Base64 images witch are stored in a database. Now i am selecting the data with PHP but i need the Data in Javascript. Without the Base64 images it's no problem to transfer the data from PHP to Javascript with following Code:
PHP:
require "Controller.php";
$controller = new Controller;
$data= $controller->getData();
Javascript:
var data = <?php echo json_encode($data); ?>
And now my question: How do i transfer base64 code from PHP to Javascript? Or is there another way to use the Images in javascript if they are in a MySQL Database?
I hope someone can help me here. Thanks :D