Location: PHPKode > scripts > ASCII text > ascii-text/ascii.class.php
<?

############################################
# Funny Ascii Text Generator               #
# 14 March 2007                            #
# http://codeidol.com                      #
############################################

class ascii
{
        var $asciiText;
        
        function ascii($text,$style)
        {
                switch($style)
                {
                        case 'graffiti':
                          include "graffiti.font";
                          break;
                        case 'banner':
                          include 'banner.font';
                          break;
                        case 'japan':
                          include 'japan.font';
                        default:
                          include 'dos.font';
                }

                $text=strtolower($text);

                for($c=0;$c<strlen($text);$c++):
                  $symbol[$c]=explode("\n",$arr[$text[$c]]);
                endfor;




                for($c=0;$c<sizeof($symbol[0]);$c++):

                        for($k=0;$k<strlen($text);$k++):

                    $output.="&nbsp;".str_replace("\r","",$symbol[$k][$c]);
                  endfor;
                    $output.="\n";
                endfor;
                
                $this->asciiText=$output;
                
        }
}
?>
Return current item: ASCII text