I have a XML node named “ID” and contains alphanumeric e.g 123xyz. I have another standard website url e.g staffexam.com which is not in the XML node.
Now I want to parse the “ID” with the website url “staffexam.com”
<?php
$xml = simplexml_load_file("exam.xml");
foreach ( $xml->ID as $examID )
{
echo " URL: ", " http://", $examID, ".staffexam.com", "\n";
}
?>
The end result shows http://123xyz.staffexam.com but it is in plain text. How do I convert this into a clickable url? Many thanks.
1 Answer