KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a PHP script that's being called through jQuery AJAX. I want the PHP script to return the data in JSON format to the javascript. Here's the pseudo code in the PHP script: $json = "{"; foreach($result as $addr) { foreach($addr as $line) { $json .= $line . "\n"; } $json .= "\n\n"; } $json .= "}"; Basically, I need the results of the two for loops to be inserted in $json.
Tags (comma-separated)
Save Edits
Cancel