<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>David Nash &#187; xml</title>
	<atom:link href="http://davidnash.com.au/tag/xml/feed/" rel="self" type="application/rss+xml" />
	<link>http://davidnash.com.au</link>
	<description>Freelance PHP developer - builder of high-quality dynamic websites</description>
	<lastBuildDate>Sun, 25 Jul 2010 23:56:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using PHP variables that contain hyphens</title>
		<link>http://davidnash.com.au/2009/11/using-php-variables-that-contain-hyphens/</link>
		<comments>http://davidnash.com.au/2009/11/using-php-variables-that-contain-hyphens/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 05:08:54 +0000</pubDate>
		<dc:creator>David</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://davidnash.com.au/?p=213</guid>
		<description><![CDATA[This took me a little while to work out. I&#8217;m using PHP5&#8217;s SimpleXML to parse XML into a PHP object. The XML has entries like &#60;HELLO-THERE&#62;.
But you can&#8217;t use $xml-&#62;HELLO-THERE because it reads the hyphen as a minus.
Instead, use $xml-&#62;{&#8221;HELLO-THERE&#8221;}
Easy!



Share:


	
	
	
	
	
	


]]></description>
			<content:encoded><![CDATA[<p>This took me a little while to work out. I&#8217;m using PHP5&#8217;s SimpleXML to parse XML into a PHP object. The XML has entries like &lt;HELLO-THERE&gt;.</p>
<p>But you can&#8217;t use $xml-&gt;HELLO-THERE because it reads the hyphen as a minus.</p>
<p>Instead, use $xml-&gt;{&#8221;HELLO-THERE&#8221;}</p>
<p>Easy!</p>



Share:


	<a rel="nofollow" target="_blank" href="http://del.icio.us/post?url=http%3A%2F%2Fdavidnash.com.au%2F2009%2F11%2Fusing-php-variables-that-contain-hyphens%2F&amp;title=Using%20PHP%20variables%20that%20contain%20hyphens" title="del.icio.us"><img src="http://davidnash.com.au/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a>
	<a rel="nofollow" target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fdavidnash.com.au%2F2009%2F11%2Fusing-php-variables-that-contain-hyphens%2F&amp;t=Using%20PHP%20variables%20that%20contain%20hyphens" title="Facebook"><img src="http://davidnash.com.au/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a>
	<a rel="nofollow" target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fdavidnash.com.au%2F2009%2F11%2Fusing-php-variables-that-contain-hyphens%2F&amp;title=Using%20PHP%20variables%20that%20contain%20hyphens" title="Google"><img src="http://davidnash.com.au/wp-content/plugins/sociable/images/googlebookmark.png" title="Google" alt="Google" class="sociable-hovers" /></a>
	<a rel="nofollow" target="_blank" href="mailto:?subject=Using%20PHP%20variables%20that%20contain%20hyphens&amp;body=http%3A%2F%2Fdavidnash.com.au%2F2009%2F11%2Fusing-php-variables-that-contain-hyphens%2F" title="E-mail this story to a friend!"><img src="http://davidnash.com.au/wp-content/plugins/sociable/images/email_link.png" title="E-mail this story to a friend!" alt="E-mail this story to a friend!" class="sociable-hovers" /></a>
	<a rel="nofollow" target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fdavidnash.com.au%2F2009%2F11%2Fusing-php-variables-that-contain-hyphens%2F" title="Technorati"><img src="http://davidnash.com.au/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a>
	<a rel="nofollow" target="_blank" href="http://twitter.com/home?status=http%3A%2F%2Fdavidnash.com.au%2F2009%2F11%2Fusing-php-variables-that-contain-hyphens%2F" title="TwitThis"><img src="http://davidnash.com.au/wp-content/plugins/sociable/images/twitter.gif" title="TwitThis" alt="TwitThis" class="sociable-hovers" /></a>


<br/><br/>]]></content:encoded>
			<wfw:commentRss>http://davidnash.com.au/2009/11/using-php-variables-that-contain-hyphens/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
