Hi Each month I receive a travel related product feed in XML that I need to access and manipulate using PHP. Each record in this particular XML file contains an entry like: <name>[place] holiday reference 12345</name> at the moment I manually add a new field for every record in the XML file for the destination, like <destination>place</destination> which is just an extract of the existing field and then use... if($this-place==$destination) {...} where $this-place comes from somewhere else in the file so if for example $this-place is New York, and $destination is also new York, the record prints out Is there a way to directly access the 'place' name (New York etc) in the <name> field without having to manually add places for every record ie chop off the '[' and ']holiday reference 12345'? and just use the <name> field directly without manually adding hundreds of items? Cheers
Sarah I rephrased this question at http://forums.digitalpoint.com/showthread.php?t=897080 because I thought I'd made it sound more complicated than it is I haven't tested it yet but it looks like 'explode' was the function I needed (PHP5 and simplexml by the way) Cheers