php code:
$rootarray = $objDOM->getElementsByTagName("Details");
foreach ($roottag1 as $rootval) {
It looks like you used
$roottag1 where you meant
$rootarray, or vice versa.
Also, your functions use variables that don't exist within the local scope. For example:
php code:
function getname() {
echo "<span id=\"name\">$username</span>";
}
$username would be undefined there. See
http://php.net/language.variables.scope.
Oh, and another bug:
php code:
if ($clean_strings = 1) {
You probably want to use the equality operator (==), not the assignment operator (=).