note 24967 added to function.preg-match
| From: | antony dot booth at kill dot webbots dot com | Date: | Fri, 06 Sep 2002 08:51:27 +0000 |
| Subject: | note 24967 added to function.preg-match | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-36229@lists.php.net to get a copy of this message | ||
I realised that my above example could be made get simple by replacing: -
// first element does not want the period('.')
$matches[0][0] = $matches[1][0];
$domain = implode('',$matches[0]);
with: -
$domain = implode('.',$matches[1]);
Where each element ommits the period and it is used as the glue in the implode statement
--
http://www.php.net/manual/en/function.preg-match.php
http://master.php.net/manage/user-notes.php?action=edit+24967
http://master.php.net/manage/user-notes.php?action=delete+24967
http://master.php.net/manage/user-notes.php?action=reject+24967