|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-07-25 22:37 UTC] zak@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 10 11:00:01 2026 UTC |
I am using php4 RC1 to parse a file that is uploaded from a user. file opens correctly, and all other characters are taken out when I use either ereg_replace or eregi_replace. However, trim($str) ltrim($str) fail to remove the beginning and trailing whitespaces. eregi_replace(" ", "", $str) ereg_replace(" ", "", $str) eregi_replace("[[:space:]]", "", $str) ereg_replace("[[:space:]]", "", $str) these also fail to remove a space at the beginning of a string that I'm reading from an uploaded text file. I'm running: System: SunOS jasonwolfe.com 5.7 Generic_106541-10 sun4c sparc SUNW,Sun_4_75 Apache 1.3.12 MySQL 3.22.32