daily pastebin goal
10%
SHARE
TWEET

Untitled

a guest Oct 12th, 2017 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // PHP code - sending data to client using camel case.
  2. $data = array();
  3. $data['success'] = true;
  4. $data['successMessage'] = $success_message;
  5. $data['displayName'] = $display_name;
  6. $data['messageId'] = $message_id;
  7. $data['userId'] = $user_id;
  8. echo json_encode($data);
  9. die();
  10.    
  11. // PHP code - sending data to client using underscores
  12. $data = array();
  13. $data['success'] = true;
  14. $data['success_message'] = $success_message;
  15. $data['display_name'] = $display_name;
  16. $data['message_id'] = $message_id;
  17. $data['user_id'] = $user_id;
  18. echo json_encode($data);
  19. die();
RAW Paste Data
Top