Old 15-04-2008, 09:16   #1 (permalink)
Paul
Junkie[scum]
 
Paul's Avatar
 
Join Date: Oct 2006
Location: location, location
Posts: 1,736
xpath range query

i'm looking to query the results for a price range (0 to 50k), can anyone let me know what the correct syntax would be

PHP Code:
$prop $xml->xpath('/root/property["price=0 to 50000"]');

foreach ( 
$prop as $list) {
// do something  


?

Last edited by Paul : 15-04-2008 at 14:53.
  Reply With Quote
Old 15-04-2008, 15:02   #2 (permalink)
Aibrean
Art Director
 
Aibrean's Avatar
 
Join Date: Jan 2004
Location: Dayton, OH
Posts: 77
Send a message via AIM to Aibrean
I definately do not code but shouldn't it be
$prop = $xml->xpath('/root/property[price="0 to 50000"]');
  Reply With Quote
Old 15-04-2008, 15:16   #3 (permalink)
Paul
Junkie[scum]
 
Paul's Avatar
 
Join Date: Oct 2006
Location: location, location
Posts: 1,736
tried that as well but no joy, thought that was the correct syntax but hey... i don't know shit
  Reply With Quote
Old 15-04-2008, 16:13   #4 (permalink)
Paul
Junkie[scum]
 
Paul's Avatar
 
Join Date: Oct 2006
Location: location, location
Posts: 1,736
think i got it, was actually a problem further down in my if statments... doh. sorry
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8