ishelk Posted November 28, 2007 Share Posted November 28, 2007 in my RDF file I have following lines. <Restaurant r:id="Afghanistan/Kabul/Anaar_Restaurant1046807280"> <Location>Afghanistan/Kabul</Location> <d:Title>Anaar Restaurant</d:Title> <Address>House Number 6, Street 4</Address> <City>Kabul</City> <Country>Afghanistan</Country> <Phone>070 284 315, 070 291 857</Phone> <CrossStreet>Kolola Pusta behind the UNICA guesthouse</CrossStreet> <Hours>daily 11am-3pm, 7pm-11pm</Hours> <ParsedHours>11-15,19-23|11-15,19-23|11-15,19-23|11-15,19-23|11-15,19-23|11-15,19-23|11-15,19-23</ParsedHours> <FoodRating>6.0</FoodRating> <ServiceRating>5.0</ServiceRating> <AmbianceRating>7.0</AmbianceRating> <OverallRating>6.0</OverallRating> <RecommendedDishes>Sesame Chicken (appetizer) Tandoori Lamb Ribs </RecommendedDishes> <Cuisine>Indian / Pakistani</Cuisine> <Cuisine>Chinese</Cuisine> <Cuisine>Thai</Cuisine> <Review r:resource="Afghanistan/Kabul/Anaar_Restaurant1046807280|1071492143"/> <Review r:resource="Afghanistan/Kabul/Anaar_Restaurant1046807280-1089924370"/> </Restaurant> Through PHP I need to extract the two resource links. How can I do that using preg_match. I used following but result is only one line. preg_match('|<Review r:resource="(.*?)"/>|is', $post, $reviews); Thanks in advance!! Ish Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.