Advertisement
Guest User

Untitled

a guest
Apr 19th, 2014
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. $data = $this->Js->get('#Form')->serializeForm(array('isForm' => true, 'inline' => true)
  2.  
  3. $.unserialize('.$data.') // I work with CakePhp so I can use variables ;)
  4.  
  5. Object {_method: "POST", data[Rating][itemtype]: "Upload", data[Rating][itemid]: "73", data[Rating][rate]: "4"}
  6.  
  7. $.unserialize('.$data.')._method // Output: POST
  8.  
  9. $.unserialize('.$data.').data[Rating][itemtype] // Mark up the '[' and ']'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement