我想从mysql查询搜索回显所有行和列,这里是我当前的php:
using (XmlWriter writer = nav.AppendChild())
{
writer.Settings.Indent = true;
XmlSerializer ser = new XmlSerializer(typeof(List<T>), overrides);
ser.Serialize(writer, _depositorsOperationsList);
}
它回应了row1col1&lt; row2col1&lt; .... rowncol1,我想要的是得到row1col1&lt; row1col2&lt; ....&lt; row2col1&lt; row2col2 ...所有行和所有列
我该怎么做?
由于
答案 0 :(得分:0)
试试这个。您可能需要稍微调整一下(格式化)
while($info = mysql_fetch_row($q))
{
if($val != '' ){
$val.=' < ';
}
foreach($info as $key => $value){
$val .= $value . ' < ';
}
}