Created
May 28, 2012 09:18
-
-
Save owaincuvelier/2818101 to your computer and use it in GitHub Desktop.
A piece of code which simply helped me to display two sets of information side by side.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Prints json decoded version of XML Object or a SimpleXML Object. | |
* | |
* @param $jsondecode If is left will print json_decoded version | |
* @author Owain Cuvelier owain@humanmade.co.uk | |
*/ | |
function ohm_handle_lastfm_data( $jsondecode = false ) { | |
if ( $jsondecode ) | |
print_r( ohm_get_lastfm_data() ); | |
else | |
print_r( json_decode( json_encode( ohm_get_lastfm_data() ), true ) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment