darksniperx Posted August 10, 2011 Share Posted August 10, 2011 I was thinking of json, but the server what i am trying to do it is running php 5.1.6, but json_encode needs 5.2.0. i wonder if there is anything that i could do, to use one of the following: print_r(), var_dump(), var_export() or anything else, to dump the information on the screen, then grab with ajax and save it as a javascript array. thx. Link to comment https://forums.phpfreaks.com/topic/244455-is-there-any-way-to-export-data-from-php-to-javascript-and-using-ajax-to-grab-it/ Share on other sites More sharing options...
trq Posted August 10, 2011 Share Posted August 10, 2011 You can just send the data back as a string with each field delimitered by some value | is nice. Or, heaven forbid use xml (hence the X in Ajax). Link to comment https://forums.phpfreaks.com/topic/244455-is-there-any-way-to-export-data-from-php-to-javascript-and-using-ajax-to-grab-it/#findComment-1255614 Share on other sites More sharing options...
darksniperx Posted August 11, 2011 Author Share Posted August 11, 2011 thx for the idea Link to comment https://forums.phpfreaks.com/topic/244455-is-there-any-way-to-export-data-from-php-to-javascript-and-using-ajax-to-grab-it/#findComment-1255634 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.