Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9187479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T19:46:43+00:00 2026-06-17T19:46:43+00:00

Possible Duplicate: How to get useful error messages in PHP? Ive started on part

  • 0

Possible Duplicate:
How to get useful error messages in PHP?

Ive started on part of my new year resolution and decided to learn php, as part of it im trying to parse in an xml feed, and echo out the name of the events wrapped in <a> tags linking them back to the events page on the xml feed’s site.

I think ive got it all in but i cant seem to see why this isnt working im just getting a blank page, if some one could point me in the right direction it would be much appreciated, cheers

<?php 
  // F1 W/H xml feed
  $xml = simplexml_load_file('http://whdn.williamhill.com/pricefeed/openbet_cdn?action=template&template=getHierarchyByMarketType&classId=5&marketSort=HH&filterBIR=N');

  foreach ($xml->response->williamhill->class->type as $type) {
    $type_attrib = $type->attributes();
    echo "<h2>".$type_attrib['name']."</h2>"; //Title - in this case f1 championship
} ?>


<ul>
  <?php 
      foreach($type->market as $event) {
          echo "<li>";
          echo "<a href="$event_attributes['url']">";
          echo $event_attributes['name'];
          echo "</a>";
          echo "</li>";
      }
  ?>
</ul>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T19:46:44+00:00Added an answer on June 17, 2026 at 7:46 pm
    echo "<a href="$event_attributes['url']">";
    

    try changing that line to

    echo "<a href=\"".$event_attributes['url']."\">";
    

    The Php parser is pretty funny about this. Usually you pick one and just stick to it, or use both single quotes and double quotes as you please. Just remember that strings with double quotes are parsed for variables.

    $hello = "Hello";
    echo "$hello master";
    

    is the same as

    $hello ="Hello";
    echo $hello.' master';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: How to get useful error messages in PHP? Im currently learning php
Possible Duplicate: How to get useful error messages in PHP? Simple errors in my
Possible Duplicate: How to get useful error messages in PHP? I have the following
Possible Duplicate: How to get useful error messages in PHP? I'm programming php on
Possible Duplicate: How to get useful error messages in PHP? I can't get this
Possible Duplicate: What are C macros useful for? Every few months I get an
Possible Duplicate: Get the resolution of a jpeg image using C# and the .NET
Possible Duplicate: Useful Regular Expression Tutorial Hello, I recently started coding in javascript. I
Possible Duplicate: Get content between two strings PHP I am trying to create a
Possible Duplicate: Get first day of week in PHP? Given a timestamp I need

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.