note 90413 added to function.trim

From: Date: Tue, 21 Apr 2009 10:37:49 +0000
Subject: note 90413 added to function.trim
Groups: php.notes 
Request: Send a blank email to php-notes+get-153537@lists.php.net to get a copy of this message
A cell read from an Excel sheet appeared to have a whitespace, and this was not getting trimmed. By converting to hex, it seems the char was a hard return. Successfully trimmed it by: <?php trim($value, "\xc2\xa0"); ?> The actual hex values may vary by character set, check with bin2hex() for what's actually there. ---- Server IP: 87.124.35.190 Probable Submitter: 80.248.186.34 ---- Manual Page -- http://www.php.net/manual/en/function.trim.php Edit -- https://master.php.net/note/edit/90413 Del: integrated -- https://master.php.net/note/delete/90413/integrated Del: useless -- https://master.php.net/note/delete/90413/useless Del: bad code -- https://master.php.net/note/delete/90413/bad+code Del: spam -- https://master.php.net/note/delete/90413/spam Del: non-english -- https://master.php.net/note/delete/90413/non-english Del: in docs -- https://master.php.net/note/delete/90413/in+docs Del: other reasons-- https://master.php.net/note/delete/90413 Reject -- https://master.php.net/note/reject/90413 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#153537) next »