从数据库中检索数据并以xml格式打印

I want to retrieve the group of data from database and print it in list view in a xml format.so that i can use that xml format data in a android application. I am able to retrieve one value from the database and print it in xml format but i am not able to retrive the array of data from the database.

thanks in advance,

If you say you are able to retrieve one value from the database but not the array, it means that your code is most likely not reading the entire resultset. Here is a dummy code

$output = Array();
$query = 'SELECT * FROM ........';
$rs = mysql_query($query);
while ($row = mysql_fetch_assoc($rs)) {
    $output[] = $row;
}
print_r($output);

The above code snippet should give you an array with all rows from the DB. Hope it helps!