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... Quote 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? Quote 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... Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.