Announcement

Collapse
No announcement yet.

Classes...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • justtesting343
    replied
    http://<a href="http://www.wee.com" ...ww.wee.com</a>
    Last edited by justtesting343; Sat 16 Mar '02, 9:58am.

    Leave a comment:


  • Gellpak
    replied
    It's so much easier to just do things all lowcase

    Leave a comment:


  • Goldfinger
    replied
    fixed it . case sensitive stuff isnt cool :\.

    i had .. $this->mstring.. and it should have been.. $this->Mstring

    Leave a comment:


  • Goldfinger
    started a topic Classes...

    Classes...

    ok i built a class for formating my messages..

    PHP Code:

    class Text
    {
        var 
    $Font;
        var 
    $Size;
        var 
    $Color;
        var 
    $Mstring;
        
        function 
    Text($font$size$color$mstring) {
            
            
    $this->Font $font;
            
    $this->Size $size;
            
    $this->Color $color;
            
    $this->Mstring $mstring;
        }
        
        function 
    BuildText(){
            
    $stringblah "<font face=\"$this->Font\" size=\"$this->Size\" color=\"$this->Color\">$this->mstring</font>";
            
            return 
    $stringblah;
        
        }

    and.. this to call it..

    PHP Code:
    include("classes.php");

    $f "verdana";
    $sz "1";
    $col "red";
    $msg "bafasddsfds";

    $blank = new Text($f$sz$col$msg);

    $message "<b>" $blank->BuildText() . "</b>";

    echo 
    $message
    it adds all the font tags and everything but it wont echo the message too :\. Any ideas how to fix this?
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X