note 8258 added to ereg

From: Date: Sat, 02 Sep 2000 03:38:53 +0000
Subject: note 8258 added to ereg
Groups: php.notes 
Request: Send a blank email to php-notes+get-3915@lists.php.net to get a copy of this message
FWIW - I allow users to post URLs right on the site. However, sometimes they want the HTTP:// business. Sometimes not. Here's a little function I find handy: function stripHTTP($url) { if (eregi('(^http[s]*:[/]+)(.*)', $url, $x)) return $x[2]; return $url; } http://www.php.net/manual/function.ereg.php

« previous php.notes (#3915) next »