<th>Qr code</th> <th>Description</th> <th>Uid</th> <!-- <th>Post</th> --> </tr> </thead> <tbody> <?php for ($i = 0; $i < sizeof($listtours); $i++) { echo "<tr>"; foreach ($listtours[$i] as $key => $value) { # code... if ($key == "guard_id") { // echo "<td>".$value."</td>"; echo "<td>" . $service->getGuardUid($value) . "</td>"; } else { echo "<td>" . $value . "</td>"; } } echo "</tr>"; } ?> </tbody> </table> </div> <!-- /widget-content --> </div> <!-- /widget --> </div> <!-- /span6 -->