Oh, right, you needed the $link to call the function. So maybe this:
PHP Code:
function si_mysqlistats() {
$link = mysqli_connect("localhost", "dbusername", "dbpassword", "dbname");
$status = explode(' ', mysqli_stat($link));
mysqli_close($link);
$s = '';
while ( list($k, $v) = each($status) ) {
$s .= $v . '<br />';
}
return $s;
}
And if you already have an open connection somewhere in the program, it would probably be better to change the function to take it as a parameter instead of opening another connection.