note 11542 added to ereg_replace
| From: | atom smasher | Date: | Fri, 23 Feb 2001 20:44:28 +0000 |
| Subject: | note 11542 added to ereg_replace | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-11504@lists.php.net to get a copy of this message | ||
truncate over-sized user fields with :
$user_string = ereg_replace(".{65,}","NAME-TO-LONG",${user_string});
replaces 65 or more of any character with "NAME-TO-LONG".
(in case someone tries to over-load your file)
(keywords: size variable truncate buffer limit cut )
http://www.php.net/manual/en/function.ereg-replace.php