Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {"2":"aaron@mail.com","1":"bernard@mail.com"}
- $.getJSON('urlwithjsonresponse.com',function(response){
- console.log(response);
- });
- {1:"bernard@mail.com",2:"aaron@mail.com"}
- $a = [ 2 => "aaron@mail.com", 1 => "bernard@mail.com" ];
- $a = array_values( $a );
- exit( json_encode( $a ) );
- $a = [
- 2 => [ "id" => 2, "email" => "aaron@mail.com" ],
- 1 => [ "id" => 1, "email" => "bernard@mail.com" ]
- ];
- exit( json_encode( array_values( $a ) );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement