Why isn't this PHP snippet working?
<p>In localhost (using Wamp on windows). I'm trying to use this:</p>

<pre><code>&lt;?
$xml = simplexml_load_file(‘http://stocklamp.tumblr.com/api/read/xml’);
$posts = $xml-&gt;xpath(“/tumblr/posts/post[@type=’regular’]”);
foreach($posts as $post) {?&gt;  
&lt;?echo $post[‘id’];?&gt;
&lt;?echo $post[‘url-with-slug’];?&gt;”&gt;
&lt;?echo $post-&gt;{‘regular-title’};?&gt;
&lt;?echo $post-&gt;{‘regular-body’};?&gt;
&lt;?echo date(“jS D M, H:i”,strtotime($post[‘date’]));?&gt;
&lt;?}?&gt;
</code></pre>

<p><s>When trying, all I see is this on my site:</p>

<pre><code>xpath(“/tumblr/posts/post[@type=’regular’]”); foreach($posts as $post) { ?&gt; ”&gt; {‘regular-title’};?&gt; {‘regular-body’};?&gt;
</code></pre>

<p></s></p>

<p>I found the snippet here:</p>

<p><a href="http://stocklamp.tumblr.com/post/274675902/putting-your-tumblr-posts-on-your-websites-the-easy-way" rel="nofollow">http://stocklamp.tumblr.com/post/274675902/putting-your-tumblr-posts-on-your-websites-the-easy-way</a></p>

<p><s>Edit: fixed. Now I'm getting </p>

<blockquote>
  <p>Parse error: syntax error, unexpected ':' in
  C:\wamp\www..\index.php on line 52</p>
</blockquote>

<p>and it is this line: </p>

<blockquote>
  <p>$xml =
  simplexml_load_file(‘http://stocklamp.tumblr.com/api/read/xml’);</p>
</blockquote>

<p>I keep getting this error: <a href="http://codepad.org/7f1IejIG" rel="nofollow">http://codepad.org/7f1IejIG</a></s></p>

<p>Okay. Now I go that fixed, but how do I get the posts by tag?</p>

<p>changing 'type=...' doesn't work.</p>

<pre><code>$posts = $xml-&gt;xpath("/tumblr/posts/post[@type='file']");
</code></pre>
