XML data not showing up on my php page....

User Generated

Naqerj777

Programming

Description

how come my php code doesn't show the xml data?

<?php
 $request_url = "http://alexishoustonmusic.tumblr.com/api/read?start=0&num=1&type=text";$xml = simplexml_load_file($request_url);$post = $xml->posts->post->{‘regular-body’};
 echo '<h1>'.$post.'</h1>';?>

User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Hey, it looks like you are loading an empty feed source. What kind of feed are you trying to get? Did you get these codes online? Are you trying to print out the Trumblr feed? I can write some new codes for you.

Related Tags