我有一个数组:

$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'];
    }
  }


我需要打印存储分辨率和票证编号的数组。

最佳答案

尝试这样的事情:

echo "<pre>" . print_r($resolution, true) . "</pre>";

关于php - 从查询结果中打印多维数组,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/26944231/

10-12 04:53