Re: Minimalistic BBcode script
| From: | Jason Wong | Date: | Sat, 14 Jun 2003 19:09:24 +0000 |
| Subject: | Re: Minimalistic BBcode script | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-151501@lists.php.net to get a copy of this message | ||
On Saturday 14 June 2003 21:53, DZ wrote:
> I found one minimalistic BBcode script, but it doesnt work.
Wouldn't it be better to find some code which *did* work?
> Warning: Unknown modifier '1' in f:\_php\_f\bb-code\test.php on line 32
>
> line 32 is such:
>
> $t = preg_replace_callback( '/[('.$atag.')(=(.*))?](.*)[/1]/isU',
> 'nc',
> $s);
>
> How to get work it?
I don't know how to get it to work, but doing
$t = preg_replace_callback( '#[('.$atag.')(=(.*))?](.*)[/1]#isU',
'nc', $s);
should at least get rid of the warning.
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Your love life will be happy and harmonious.
*/