using and converting PHP variable and array into JavaScript

preview_player
Показать описание
In this tutorial, you will be able to learn how to use PHP variables and arrays in JavaScript.
Рекомендации по теме
Комментарии
Автор

Hi Haroon, You forgot one very important step. After line 15 you should have JSON.parse(Array) this would have turned the string back into a usable indexed array. Otherwise great video

joshuadouglas-smith
Автор

Shahbash.... i Learnt alot from above Video. Bravo Bravo!

naqashahmed
Автор

Lovely video Haroon. Is there an easy way to convert an associative array from PHP into a javascript object?

davefinn
Автор

to print array you should user print_r() function

AjitKumar-lvrm
Автор

I tried to use this in my coding and at first it worked. I was able to pass arrays from php to JavaScript. But later it didn’t work, I’m not sure why. I have Hebrew in the db table. So I updated the xampp to date, and was looking into the PDO and utf-8. But I wasn’t able to work things out. So it remains unresolved.

kingkakig
Автор

Why are nobody showing how to get variables in the js script...?

bobbobsthebob
Автор

Dear haroon
i need to contact you for a js and php code problems can i have your e mail cause i can, t contact you through here

حنسافر
join shbcf.ru