Refactor
:my
=>
'code'
Codes
Refactorings
Popular
Best
Submit
Spam
Account
Logout
Login
JavaScript doesn't seem to be activated, expect things to be ugly and sloppy!
Learn How to Create Your Own Programming Language
createyourproglang.com
Recent
FILE HOSTS PREMIUM ACCOUNT
ALL FILE HOST PREMIUM ACCOUNTS
Zynga Slingo Trainer v5.12
iTunes Gift Card Generator V3.1 2012
Diablo 3 GOLD Coins FREE
Working PS3 Jailbreak 3.65 And 3.66
ExtaBit Premium Accounts and Cookies
Steam Wallet Hack - Money Adder & Hack v3
Empires & Allies Hack Cheat Trainer v5.4.1
Eve Onnline 60 Days Time Card Generator v2
Popular
XBOX POINTS GENERATOR - MICROSOFT POINTS GENERATOR v1.2012
11 may 2012 premium uploading accounts 100% working
Free Microsoft Points
Free Microsoft Points - Microsoft Points Generator - Xbox Live Codes 2012
Car Town Free Blue Points Hack
Free CarTown Blue Points Generator and CarTown Templates
Better way to get content via jQuery $.get()
Free Microsoft Points
Simple Days Purger
Sharecash Downloader Bypass Surveys New 05/2012
Pastable version of
Moving my xml parsing into a function.
<pre class='prettyprint' language='php'><?php // Load correct xml for corresponding page. function page_xml($page) { $xml_list = array( 'home' => 'http://cm.cyloop.com/feeds/drupal/cyloop_mobile.xml', 'Artist' => 'http://cm.cyloop.com/feeds/drupal/cyloop_mobile.xml', 'People' => 'http://cm.cyloop.com/feeds/drupal/cyloop_mobile.xml', 'News' => 'http://cm.cyloop.com/feeds/drupal/cyloop_mobile.xml' ); $xml = new SimpleXMLElement($xml_list[$page]); return $xml; } ?></pre> <pre class='prettyprint' language='php'><?php require "assets/functions.php"; page_xml(home); $content = $xml->xpath('item/title'); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <title>Cyloop Mobile</title> </head> <body> <div id="container"> <div id="header">Cyloop Mobile</div> <div id="nav"> <ul> <li>Home</li> <li>Artist</li> <li>People</li> <li>News</li> </ul> </div> <div id="wrapper"> <ul> <?php foreach ($content as $artist) { echo "<li>$artist</li>"; }?> </ul> </div> </div> </body> </html></pre> <a href="http://www.refactormycode.com/codes/309-moving-my-xml-parsing-into-a-function" style="color:#fff" title="As seen on RefactorMyCode.com"><img alt="Small_logo" src="http://www.refactormycode.com/images/small_logo.gif" style="border:0" /></a>