Advertisement
Guest User

Untitled

a guest
Jun 26th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.31 KB | None | 0 0
  1. In Js:
  2.  
  3.    $.post("/artigo/favoritar/", function(data){
  4.        alert(data.nome);
  5.    }, "json");
  6.  
  7.  
  8. In php:
  9.  
  10. public function favoritarAction()
  11.     {
  12.  
  13.     $data = array(
  14.             'nome' => 'diogo',
  15.             'sobrenome' => 'alves'
  16.         );
  17.  
  18.         return Zend_Json::encode($data);
  19.        
  20.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement