$maxchar){ $words=explode(" ",$text); $output = ''; $i=0; while(1){ $length = (strlen($output)+strlen($words[$i])); if($length>$maxchar){ break; }else{ $output = $output." ".$words[$i]; ++$i; }; }; }else{ $output = $text; } return $output.$end; } function thispage(){ return substr($_SERVER["REQUEST_URI"],0,strpos($_SERVER["REQUEST_URI"],'.')).".php"; } ?> HOUSE OF DANCE
Facebook

HOUSE OF DANCE
EVENTS

0){ $tpage = ceil($total/$showperpage); if($page<1){$page=1;} if($page>$tpage){$page=$tpage;} $startrow = ($page-1)*$showperpage; } $query = "SELECT id,title FROM ".$tb." WHERE active=1 ORDER BY prior DESC"; $query.=" LIMIT ".$startrow.",".$showperpage; $result = mysql_query($query); while($row=mysql_fetch_row($result)){ list($id,$title) = $row; ?>