note 22680 deleted from function.sprintf by spic

From: Date: Mon, 16 Sep 2002 11:54:00 +0000
Subject: note 22680 deleted from function.sprintf by spic
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-36743@lists.php.net to get a copy of this message
Well I came up with this one, extremely simple. instead of writing <span class="class">hello</a> you can write: print class('class','hello'); using sprintf ----------------------------- function class_ ($class, $text=false) { return sprintf ("<span class=\"%s\">%s</span>", $class, ($text ? $text : $class) ); } -----------------------------

« previous php.notes (#36743) next »