Ok so I have the following code. I'm trying to output some xml so that it can be read with jQuery, but for whatever reason, when I try to add an element in the array to a variable, it just turns the variable to 0. I did a print_r() on the array, and it's normal.
Code
if ($content == "tables") {
$result = mysql_query("show tables");
$xml = "<tables>";
while ($row = mysql_fetch_assoc($result)) {
print_r($row);
echo "<br />";
$xml += "<table>" . $row['Tables_in_blog'] . "</table>";
}
//header('Content-type: text/xml');
echo $xml;
}
Output
Array ( [Tables_in_blog] => post )
Array ( [Tables_in_blog] => posts )
0
Does anyone know why it would do this?