Hi there, I am trying to create a textbox and button for the user to change the key word on the following lineCode:<html> <head> <title>PHP Test</title> </head> <body> <?php // specify url of xml file $url = "http://xmlfeed.laterooms.com/index.aspx?aid=11657&rtype=4&kword=london"; // get xml file contents $xml = simplexml_load_file($url); // loop begins foreach($xml->hotel as $hotel) { // begin new paragraph echo "<p>"; echo "<img src=".$hotel->images." height=100 width=100><br/>"; echo "<strong>Hotel Name:</strong> ".$hotel->hotel_name."<br/>"; echo "<strong>Hotel City:</strong> ".$hotel->hotel_city."<br/>"; echo "<strong>Prices From:</strong> £".$hotel->prices_from."<br/>"; echo "<strong>Hotel Link:</strong><a href=".$hotel->hotel_link.">click here</a><br/>"; echo "</p>"; // end paragraph } // loop ends ?> </body> </html>
Thankyou for your help in advanceCode:$url = "http://xmlfeed.laterooms.com/index.aspx?aid=11657&rtype=4&kword=london";



Reply With Quote

Bookmarks