用php从sql表中检索xml标签

i am trying to retrieve xml tags from a table . I can't print the tags, just only the values.

for example:

<product>
<item>a</item>
<price>20</price>
</product>

When i try to print it with php code:

$q2 = mysql_query("SELECT * from products");
while ($rowq2 = mysql_fetch_array($q2)) {
echo $rowq2["product_xml"];
}

The print is without tags, but i want to print this as it is (with the tags).

Please help me!

This is because the browser thinks <product> is an HTML tag and does not display it. You need to use htmlentities() like this:

$q2 = mysql_query("SELECT * from products");
while ($rowq2 = mysql_fetch_array($q2)) {
    echo htmlentities($rowq2["product_xml"]);
}