Skip to content

Instantly share code, notes, and snippets.

@twysto
Last active August 29, 2015 14:08
Show Gist options
  • Save twysto/ce21f88d1f65b15fadf0 to your computer and use it in GitHub Desktop.
Save twysto/ce21f88d1f65b15fadf0 to your computer and use it in GitHub Desktop.
[PHP] One line "XML to Array"
<?php
$array = json_decode(json_encode(simplexml_load_string(file_get_contents("http://news.yahoo.com/?format=rss"))), TRUE);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment