我有一个数组: -
$resolution = array();
foreach ($report as $key => $val) {
$queryToGetRes = "SELECT resolution,ticket_no FROM techzilla.bugs WHERE bug_id = '$val' ";
$sqlResult = mysql_query($queryToGetRes) or die (mysql_error());
while ($resolutionAns = mysql_fetch_array($sqlResult)) {
$resolution[$resolutionAns['resolution']][] = $resolutionAns['ticket_no'];
}
}
我需要打印存储分辨率和票号的数组
答案 0 :(得分:1)
尝试这样的事情:
echo "<pre>" . print_r($resolution, true) . "</pre>";
答案 1 :(得分:0)
出于调试目的,您应该使用
var_dump($resolution);
如果你想使用它
foreach ($resolution as $r => $ids){
echo "Resolution : $r\n";
foreach ($ids as $id) {
echo "$id\n";
}
}