Advertisement
Guest User

Untitled

a guest
Sep 17th, 2012
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. Code 1:
  2. $.each(data, function() {
  3. alert(this.idWallPosts);
  4. $(this.idWallPosts).appendTo('#main');
  5. });
  6.  
  7. Code 2:
  8. $idWallPostsArray = array();
  9. foreach ($result->result() as $row) {
  10. $idWallPostArray = array();
  11. $idWallPostArray['idWallPosts'] = $row->idwallPosts;
  12. $idWallPostsArray[] = $idWallPostArray;
  13. }
  14. echo json_encode(array("idWallPosts" => $idWallPostsArray));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement