<a href="details.php?phoneid=1"><img src="phone01.jpg"></a>
When I write the code like this it’s working fine. But when I edit this to assign a php variable to GET value, it’s not working.
<a href="Details.php?phoneid=<?php $Pid_arr[count($Pid_arr)-1]?> " class="product" title="Product 1">
Can someone pleas explain why ?
Thanks in advance.
You need to echo the variable:
You can also do it this way: