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

User Generated

Naqerj777

Programming

Question 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>';?>

Student has agreed that all tutoring, explanations, and answers provided by the tutor will be used to help in the learning process and in accordance with 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.

urael (1070)
Carnegie Mellon University

Anonymous
Great content here. Definitely a returning customer.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4