Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. <?php
  2. // Array con los valores que quiero retornar
  3. $arrJson = array('clave' => 'valor');
  4. // Cabecera para que su contenido sea considerado como un objeto JSON
  5. header('Content-Type: application/json');
  6. // Retorno del array serializado como JSON
  7. echo json_encode( $arrJson );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement