worldworld Posted February 26, 2007 Share Posted February 26, 2007 Hi, I just wanted a clean script to insert in a javascript array the elements of a php array. Any help will be thankful... Thanks... Link to comment https://forums.phpfreaks.com/topic/40139-insert-in-a-javascript-array-the-elements-of-a-php-array/ Share on other sites More sharing options...
fenway Posted February 26, 2007 Share Posted February 26, 2007 You mean writing out JS from PHP? Link to comment https://forums.phpfreaks.com/topic/40139-insert-in-a-javascript-array-the-elements-of-a-php-array/#findComment-194628 Share on other sites More sharing options...
ozfred Posted March 2, 2007 Share Posted March 2, 2007 Hi, I just wanted a clean script to insert in a javascript array the elements of a php array. Any help will be thankful... The syntax for a javascript Array literal is: var anArray = [ 'element 0', 'element 1', 'element 2', ... ]; And so on... Link to comment https://forums.phpfreaks.com/topic/40139-insert-in-a-javascript-array-the-elements-of-a-php-array/#findComment-197599 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.