Hash: SHA1

* On 12-01-02 at 13:02 
* Lauri Vain said....

> Hi Nick, 
> Yes, I thought about that. But, what should I do when the markers are absolutely NOT 
>in any sequence. 
> I also thought about something like
>       $replace[1][1] = "!one!";       //marker
>       $replace[1][2] = "hehee";       //replace with
>       $replace[1][1] = "test";        //marker
>       $replace[1][2] = "foobar";      //replace with
>       $replace[1][1] = "repl";        //marker
>       $replace[1][2] = "humpty-dumpty";       //replace with
>       $replace[1][1] = "blah";        //marker
>       $replace[1][2] = "boo";         //replace with
> Now, when I would do a loop thingie that goes through all those, then it would be a 
>pretty nice and compact solution... 
> What about speed issues regarding this solution? 

I don't think speed will be an issue unless you have thousands of
markers, in which case you'll need to re-think the whole thing.

Can you not put all of your markers in an array like 

$markers=array("m1", "m2", "m_whatever");

and all your replacements likewise

$replace=array("r1", "r2", "r_whatever");

and then loop through like that?

If not, explain a little more about the context of the problem and let's
see if we can come up with an alternative.
- -- 

Nick Wilson

Tel:    +45 3325 0688
Fax:    +45 3325 0677
Web:    www.explodingnet.com

Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org


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]

Reply via email to