I am just beginning to learn PHP, javascript and mySQL.
I have managed to use PHP to turn mySQL results into json array:
var arrayObjects = <?php echo json_encode($results); ?>
Now I have a javascript array, which I don't know how to use.
If I view "arrayObjects" in the browser console, it shows the following:
[Object]
0: Object
ID: "1"
Theme: "2"
Item1: "0"
Item2: "1"
Item3: "2"
I would like to use "Theme" as an int in javascript, but I have no idea how I can get that as an int variable.
parseInt(arrayObjects[0].Theme)or+arrayObjects[0].Themeas a shortcut.$resultsin javascript or just "how I can get that as an int variable" ?