Jump to content

christopherpm

Members
  • Posts

    6
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://www.chrismillard.com

Profile Information

  • Location
    Ths Highlands of Scotland
  • Interests
    Photography (landscapes and buildings), Films - I have an extensive DVD collection, Visual Basic programming, web design, but most importantly, my family....

christopherpm's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Thank you, thank you, thank you....
  2. I have, for example, 3 strings:-$sunrise = "7:30 am"$sunset = "6:25 pm"$time = "7:00 pm"I want my script to act differently based on whether $time falls inbetween $sunrise and $sunset, or outside (i.e. between $sunset and $sunrise)Can anyone give me a clue as to how the heck I do this? Thanks
  3. It's getting close, but in the example above, using my actual xml file, I get the following result:-Array ( [0] => SimpleXMLElement Object ( [0] => Fort William ) ) The actual city name is "Fort William", and it is just that text that I want to display - can the other text be stripped off?ALSO, my web host is using PHP 4.4.4 not 5.x - is this available in a pre-V5.x PHP?
  4. From what I have gathered so far, I assume I have to use getElementsByTagNameNS but I still cannot get the result I want which is to show the value of "city" from abouttown:locationAny ideas?
  5. I have an XML/RSS feed that I want to extract some data from, and I really don't know how....I can get most bits of data out of the feed, but my problem lies with these two issues:-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>- <rss version="2.0" xmlns:abouttown="there is a URL here">- <channel> <title>My title</title> <description>My description</description> <abouttown:location city="A City Name" country="UK" />- <image> <title>Image Title</title> </image>- <item> <title>Item Title</title> </item> ............ 1) How do I extract the city and country from the above to display in my HTML document?2) There is a Channel tag, and Image tag and an Item tag (in that order) - within each of these there is a Title tag - I want to get the Title tag from Item. How do I get that?I would appreciate any help (and apologise if this seems like a stupid question).Thank you.
×
×
  • Create New...