dynamic links using php
<p>i have this code snippet tha loops through an xml file and outputs the name and sector values 
in the file onto a livtview. this is the format of xml:</p>

<pre><code>&lt;searches&gt;
&lt;search id ='1234'&gt;
&lt;name&gt; somename &lt;/name&gt;
&lt;address&gt; some address &lt;/address&gt;
&lt;sector&gt; some sector &lt;/sector&gt;
&lt;contacts&gt; 12345, me@me.com &lt;/contacts&gt;
&lt;searches&gt; 
</code></pre>

<p>this is the loop:</p>

<pre><code>&lt;div&gt;

&lt;ul data-role="listview" data-inset="true" class="ui-listview ui-listview-inset     ui-corner-all ui-shadow"&gt;

&lt;?php foreach($objj as $searches): ?&gt; 
&lt;li&gt;&lt;a href="" data-role="button"&gt; &lt;?php echo $searches -&gt; name) ?&gt;&lt;/a&gt;&lt;/li&gt;  

&lt;?php endforeach ?&gt;
&lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p>Any time the a button is clicked, i want the rest of the information (ie. contact and address) of only that link to be echoed to the user... Please help. any link is welcome...</p>

<p>the js solution is good but its a mobile web and i guess the screen size will not help and moreso when the results of that user is pasted on the next page the result will be sent to others by email or sms and also shared on facebook so i think i will go in for php solution but i think am not getting the explanation on the php solution can you please elaborate?</p>
