I want the variable or $name to be printed in this line... it might be john, mark whatever... can someone please help
$name = $row[username]; $xml = "<query> <title> $name </title> </query>";
Put username in single-quotes, like this:
$name=$row['username']; $xml = "<query> <title> $name </title> </query>";
I suspect that PHP wasn't properly recognizing username as an array key in $row.
nope that does nothing
What is the output when you
echo $name;
it is bikerrider which is the username
So I'm assuming that you're not getting what you want. What are you getting? It's a bit hard to give a diagnosis without any description of symptoms.
i would assume that this...
would output this
<query> <title> $name </title> </query>
so why not try this...
$xml = "<query><title> ".$row[username]."</title></query>";