atimbiresteven Posted June 29, 2012 Share Posted June 29, 2012 i have an xml file that has this format below: <searches> <search id ='1234'> <name> somename </name> <address> some address </address> <sector> some sector </sector> <contacts> 12345, [email protected] </contacts> <search id ='3455'> <name> somename </name> <address> some address </address> <sector> some sector </sector> <contacts> 12345, [email protected] </contacts> <searches> this loop below dynamically outputs all the name values in the file as links to the user. <div> <ul data-role="listview" data-inset="true" class="ui-listview ui-listview-inset ui-corner-all ui-shadow"> <?php foreach($objj as $searches): ?> <li><a href="selected.php?..." data-role="button"> <?php echo $searches -> name ?></a></li> <?php endforeach ?> </ul> </div> QUESTIONS: i want the href attribute to link to a page called "selected.php" and display the sector,contact and address values for that particular anchor tag that will be clicked. Every item has a unique id as in the xml file above. only the other details of that particular link should be shown so that the user can like,share on facebook or send it to a friend via email or sms on the new page. Thanx in advance. Quote Link to comment https://forums.phpfreaks.com/topic/264989-how-to-make-my-tag-dynamic/ 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.