9 if ($connection->driverName ==
'mysql') {
10 foreach ($explainRows as &$row) {
11 foreach ($row as &$cell) {
12 $cell = preg_replace(
'/\s*[,:;]\s*/',
'$0 ', $cell);
13 $cell = preg_replace(
'/\s*[\[({]\s*/',
' $0', $cell);
14 $cell = preg_replace(
'/\s*[\])}]\s*/',
'$0 ', $cell);
15 $cell = preg_replace(
'/([\[({])\s+([\[({])/',
'$1$2', $cell);
16 $cell = preg_replace(
'/([\])}])\s+([\])}.,:;])/',
'$1$2', $cell);
23 <?php
if (($first = reset($explainRows)) !==
false): ?>
24 <table
class=
"table table-condensed table-bordered">
27 <?php
foreach (array_keys($first) as $key): ?>
28 <th><?php echo CHtml::encode($key); ?></th>
33 <?php
foreach ($explainRows as $row): ?>
35 <?php
foreach ($row as $value): ?>
36 <td><?php echo CHtml::encode($value); ?></td>