note 59970 added to function.trim

From: Date: Wed, 21 Dec 2005 16:18:03 +0000
Subject: note 59970 added to function.trim
Groups: php.notes 
Request: Send a blank email to php-notes+get-100520@lists.php.net to get a copy of this message
I dont know the reason but I found out that if we need to remove white space in the stings obtained by "get" method. We should use the follow code: $word=trim($_GET['word']); not $word=$_GET['word']; trim($word); otherwise, the "trim" will not function! what is the difference? I also want to know. Anyway, please remind it! hope that this is useful! ---- Manual Page -- http://www.php.net/manual/en/function.trim.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+59970 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59970&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59970&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59970&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59970&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59970&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59970&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59970&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+59970&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#100520) next »