note 60817 added to function.trim

From: Date: Tue, 17 Jan 2006 17:30:58 +0000
Subject: note 60817 added to function.trim
Groups: php.notes 
Request: Send a blank email to php-notes+get-101983@lists.php.net to get a copy of this message
This staetment removes the trailing and leading whitespaces from the string..Really useful when handling the form values submitted by a visitor or analyzing a log file. $trimmed_string = preg_replace ( "/\s\s+/" , " " , $untrimmed_string ); Note : thsi would only remove leading and trailing whitespaces. For the whitespaces in the string use any of the above methods. ---- Server IP: 12.160.245.96Probable Submitter: 138.87.165.26 ---- Manual Page -- http://www.php.net/manual/en/function.trim.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+60817 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60817&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60817&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60817&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60817&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60817&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60817&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60817&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+60817&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#101983) next »