cada quien tiene su manera de programar yo e tomado el codigo y e corregido de esta forma trabaja muy bien
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Hotspot/Hosts in Mikrotik</title>
<style type="text/css">
<!--
a:link {text-decoration: none;}
a:visited {text-decoration: none;}
a:hover {text-decoration: none;}
a:active {text-decoration: none;}
-->
</style></head>
<body link="#006600">
<?php
function popup( $text, $popup ){
?>
<a href="javascript:void(0);" onmouseover="return overlib('<?php echo($popup); ?>');" onmouseout="return nd();"><?php echo($text); ?></a>
<?php
}
?>
<script type="text/javascript" src="overlib/overlib.js"><!-- overLIB (c) Erik Bosrup --></script>
<?php
require('routeros_api.class.php');
$API = new routeros_api();
$API->debug = false;
$API->port = 2086;
$servidor="172.16.0.1";
$usuario="admin";
$clave="88708870";
if ($API->connect($servidor, $usuario, $clave)) {
$ARRAY = $API->comm("/ip/hotspot/host/print");
$registros=count($ARRAY);
echo "<table width=100% border=1>";
echo "<tr><td align=left size=3>Id</td><td size=3>mac-address</td><td size=3>address</td><td size=3>to-address</td><td>server</td><td>uptime</td><td>keepalive-timeout</td><td>found-by</td><td>DHCP</td><td>authorized</td><td>bypassed</td><td>comment</td></tr>";
echo "<tr><td align=left>";
for ($i=0; $i<$registros; $i++){
$regtable = $ARRAY[$i];
//
if (!isset($regtable['.id'])) { $regtable['.id']="";}
if (!isset($regtable['mac-address'])) { $regtable['mac-address']="";}
if (!isset($regtable['address'])) { $regtable['address']="";}
if (!isset($regtable['to-address'])) { $regtable['to-address']="";}
if (!isset($regtable['server'])) { $regtable['server']="";}
if (!isset($regtable['uptime'])) { $regtable['uptime']="";}
if (!isset($regtable['keepalive-timeout'])) { $regtable['keepalive-timeout']="";}
if (!isset($regtable['found-by'])) { $regtable['found-by']="";}
if (!isset($regtable['DHCP'])) { $regtable['DHCP']="";}
if (!isset($regtable['authorized'])) { $regtable['authorized']="";}
if (!isset($regtable['bypassed'])) { $regtable['bypassed']="";}
if (!isset($regtable['comment'])) { $regtable['comment']="";}
//
echo "<tr>";
echo "<td align=left><font color=#04B404 size=3>" . $regtable['.id'] . "</font></td>";
echo "<td align=left><font color=#04B404 size=3>" . $regtable['mac-address'] . "</font></td>";
echo "<td align=left><font color=#04B404 size=3>" . $regtable['address'] . "</font></td>";
echo "<td align=left><font color=#04B404 size=3>" . $regtable['to-address'] . "</font></td>";
echo "<td align=left><font color=#000099 size=3>" . $regtable['server'] . "</font></td>";
echo "<td align=left><font color=#003300 size=3>" . $regtable['uptime'] . "</font></td>";
echo "<td align=left><font color=#003300 size=3>" . $regtable['keepalive-timeout'] . "</font></td>";
echo "<td align=left><font color=#880000 size=3>" . $regtable['found-by'] . "</font></td>";
if ($regtable['DHCP']=="true") {
echo "<td align=left><font color=#04B404 size=3>" . $regtable['DHCP'] . "</font></td>";
}else{
echo "<td align=left><font color=#FF0000 size=3>" . $regtable['DHCP'] . "</font></td>";
}
if ($regtable['authorized']=="true") {
echo "<td align=left><font color=#04B404 size=3>" . $regtable['authorized'] . "</font></td>";
}else{
echo "<td align=left><font color=#FF0000 size=3>" . $regtable['authorized'] . "</font></td>";
}
if ($regtable['bypassed']=="true") {
echo "<td align=left><font color=#04B404 size=3>" . $regtable['bypassed'] . "</font></td>";
}else{
echo "<td align=left><font color=#FF0000 size=3>" . $regtable['bypassed'] . "</font></td>";
}
echo "<td align=left><font color=#04B404 size=3>" . $regtable['comment'] . "</font></td>";
echo "</tr>";
}
echo "</table>";
$API->disconnect();
}
?>
</body>
</html>