array_rand and strcontains ??
| From: | Tom Fishwick | Date: | Sat, 26 Feb 2000 09:08:17 +0000 |
| Subject: | array_rand and strcontains ?? | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-16042@lists.php.net to get a copy of this message | ||
Hi,
Just a thought for two new functions:
1. random_element array_rand(array input) - easy to do in php... but i
think it would fit in well with the array_* funcs
2. bool strcontains(string str) - I would think there's something to do
this right now, ereg or strpos are the closest I can think of, but ereg
can be slow plus you have to escape it, and with strpos if the string
your looking for is at the beggining it returns 0...
Thanks,
Tom