Skip to content

Instantly share code, notes, and snippets.

@gaurish
Created August 17, 2011 17:27
Show Gist options
  • Save gaurish/1152076 to your computer and use it in GitHub Desktop.
Save gaurish/1152076 to your computer and use it in GitHub Desktop.
<?php
$api_msg = $xml->xpath('//message');
switch(string() $api_msg['type']){
case 'message':
$successful = TRUE;
break;
case 'error':
$successful = FALSE;
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment