public static function tably($records)
    {
        if (count($records) === 0) {
            return null;
        }
        
        $htmls = array();
        $htmls[] = '<table>';
        foreach ($records as $record) {
            $htmls[] = '<tr>';
            foreach ($record as $k => $v) {
                $htmls[] = sprintf('<td class="%s">%s</td>', Str::machine($k), $v);
            }
            $htmls[] = '</tr>';
        }
        $htmls[] = '</table>';
        return join("\n", $htmls);
    }
public static function tably($records)
    {
        if (count($records) === 0) {
            return null;
        }
        
        $htmls = array();
        $htmls[] = '<table>';
        foreach ($records as $record) {
            $htmls[] = '<tr>';
            foreach ($record as $k => $v) {
                $htmls[] = sprintf('<td class="%s">%s</td>', Str::machine($k), $v);
            }
            $htmls[] = '</tr>';
        }
        $htmls[] = '</table>';
        return join("\n", $htmls);
    }
public static function tably ( $ records ) { if ( count ( $ records ) === 0 ) { return null ; } $ htmls = array ( ) ; $ htmls [ ] = '<table>' ; foreach ( $ records as $ record ) { $ htmls [ ] = '<tr>' ; foreach ( $ record as $ k => $ v ) { $ htmls [ ] = sprintf ( '<td class="%s">%s</td>' , Str :: machine ( $ k ) , $ v ) ; } $ htmls [ ] = '</tr>' ; } $ htmls [ ] = '</table>' ; return join ( "\n" , $ htmls ) ; }
Get a table
@param array $records
@return string
Get a table