Login   Register  
PHP Classes
elePHPant
Icontem

PHP Array to Javascript: Convert PHP arrays into Javascript objects

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (2)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2006-09-20 (8 years ago) RSS 2.0 feedStarStarStar 46%Total: 2,417 All time: 1,483 This week: 1,435Up
Version License Categories  
array_to_js 1.0GNU General Public Lice...Data types
Description Author  

This class can be used to convert PHP associative arrays to Javascript objects that have properties set with the PHP array entries.

It traverses the entries of one or more associative arrays recursively and generates code that define Javascript objects.

The names of the object properties are the keys of the array entries. The property values are set to the respective array values.

Picture of Jan Paepke
Name: Jan Paepke <contact>
Classes: 2 packages by
Country: Germany Germany
Age: 31
All time rank: 82856 in Germany Germany
Week rank: 1712 Down92 in Germany Germany Down

  Files folder image Files  
File Role Description
Accessible without login Plain text file class_arraytojs.php Class Main Class File
Plain text file example.php Example example / documentation

 Version Control Unique User Downloads Download Rankings  
 0%Total:2,417All time:1,483
 This week:0This week:1,435Up
 User Ratings  
 
 All time
Utility:63%StarStarStarStar
Consistency:66%StarStarStarStar
Documentation:-
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:46%StarStarStar
Rank:1849