note 43538 added to function.trim

From: Date: Thu, 24 Jun 2004 20:31:16 +0000
Subject: note 43538 added to function.trim
Groups: php.notes 
Request: Send a blank email to php-notes+get-71615@lists.php.net to get a copy of this message
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. ---- Manual Page -- http://www.php.net/manual/en/function.trim.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+43538 Delete -- http://master.php.net/manage/user-notes.php?action=delete+43538&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+43538&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#71615) next »