<?php header("Content-Type: text/xml"); echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; ?> <!-- here is the XML --> <totals> <picture><?php echo $picture; ?></picutre> // returns sun.jpg </totals>
I get sun.jpg returned. Now here is the problem I want to insert the $picture (i.e sun.jpg) variable so that the result is a hyperlink like this...
<picture> <a href="images/<?php echo $picture; ?>"></a> </picutre> //doesn't work
I try replacing the following signs < " and > with codes:
<picture><a href="images/<?php echo $picture; ?>"></a> </picutre>
(edited by a moderator to clean up the code so it wraps)