note 37513 added to function.explode
| From: | siavash79_99 at yahoo dot com | Date: | Tue, 18 Nov 2003 14:13:34 +0000 |
| Subject: | note 37513 added to function.explode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-60568@lists.php.net to get a copy of this message | ||
This tiny function makes explode() case-insensitive:
just paste it at end of your code and use explodei() instead of explode().
have fun ;)
function explodei($separator, $string, $limit = 0 )
{
$string = ( $limit ) ? preg_replace( "/($separator)/i", $separator, $string, ($limit - 1)
) : preg_replace( "/($separator)/i", $separator, $string );
return ( $limit ) ? explode ( $saparator, $string, $limit) : explode ( $separator, $string);
}
----
Manual Page -- http://www.php.net/manual/en/function.explode.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+37513
Delete -- http://master.php.net/manage/user-notes.php?action=delete+37513&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+37513&report=yes
Search -- http://master.php.net/manage/user-notes.php