Advertisement
Guest User

Untitled

a guest
Sep 23rd, 2015
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.53 KB | None | 0 0
  1. $json = json_decode($result, true);
  2. foreach( $json as $key => $value ) {
  3.     if( $key == "purchase" ) {
  4.         $purchase = json_decode( $value,true );
  5.         foreach( $purchase as $subkey => $subvalue ) {
  6.             if( $subkey == "email" ) {
  7.                 if( $subvalue == $email ) {
  8.                     echo "\n\nVALID EMAIL\n\n";
  9.                                     break;
  10.                                 } else {
  11.                                     echo "\n\n\n ******* NON-VALID EMAIL ******* \n\n\n";
  12.                                 }
  13.                         }
  14.         }
  15.         break;
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement