note 43538 deleted from function.trim by victor

From: Date: Thu, 24 Jun 2004 22:41:19 +0000
Subject: note 43538 deleted from function.trim by victor
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-71625@lists.php.net to get a copy of this message
Note Submitter: warhog at warhog dot net ---- i think one thing not mentioned but known my many of the commentors is the "real" function-definition string trim (string string, string which_chars) u can define WHICH characters should be cut off at the end/beginning of a string. defaults to all white space characters -> "\n\r\t\v\0 " for example if you've got a tag <?php $tag = "<tag>"; ?> u may wan't to get the tags name... u could do so with <?php $tag = trim($tag, "<>"); // "tag" ?> same for ltrim and rtrim.

« previous php.notes (#71625) next »