-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
* On 12-01-02 at 12:49
* Lauri Vain said....
> Hello there,
>
> I have about 30 markers in the text which need to be replaced with the value of a
>variable or an array.
>
> Common sense comes up with
>eregi_replace("!one!","blah",eregi_replace("!heh!",'foobar',eregi_replace("blah","ho-ho-ho",text)));
>
>
> The list above could go on and on... I'm sure there are better ways to replace many
>markers or spans of text with something else. A loop? Something even more easier and
>better?
>
> Thanks,
> Lauri
If the 'markers' are in some kind of sequence (like marker1, marker2
etc) you could use a loop.
- --
Nick Wilson
Tel: +45 3325 0688
Fax: +45 3325 0677
Web: www.explodingnet.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE8QCOJHpvrrTa6L5oRAu8zAJ0ae4AFomhUhUaK8MneNdm/BtnTNACfXhGh
9FydYCt1iS/rmBh83LyBWHs=
=CQIT
-----END PGP SIGNATURE-----
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]