Re: [PHP] problem matching multiple times

2003-07-18 Thread Vince LaMonica
On Fri, 18 Jul 2003, Curt Zirzow wrote: } > Do you mean: } > } > $patterns[3] = "/###Image($count+1)###/"; } > $replacements[3] = "$sel_image = "SELECT * from ppd_photos where ppd_id = '$_GET[ppdid]' AND place_holder = '$thephoto[0]'"; } What does this return? } } I'm a bit confused right no

Re: [PHP] problem matching multiple times

2003-07-18 Thread Curt Zirzow
Vince LaMonica <[EMAIL PROTECTED]> wrote: > On Fri, 18 Jul 2003, Curt Zirzow wrote: > > [snip] > } > } The only solution I can think of is while your looping through the > } images they have build more pattern/replacemen array items > } > } foreach (row in db) > }$pattern[] = /###Image($cou

Re: [PHP] problem matching multiple times

2003-07-18 Thread Vince LaMonica
On Fri, 18 Jul 2003, Curt Zirzow wrote: } btw, you know you can do this in one step: } } $message = preg_replace("/\[(i|b)\](.*?)\[\/(i|b)\]/si", "<\$1>\$2", $message); Doh! Thanks for the tip...that'll save some lines of code :) } > $patterns[3] = "#\#\#\#Image(.*?)\#\#\##si"; } > // this mat

Re: [PHP] problem matching multiple times

2003-07-17 Thread Curt Zirzow
Vince LaMonica <[EMAIL PROTECTED]> wrote: > Hi All, hello > [...] > function vjencode($message) { > > $message = " " . $message ; > > ##--- [b] and [/b] for bolding text. > $message = preg_replace("/\[b\](.*?)\[\/b\]/si", "\\1", $message); > > ##--- [i] and [/i] for italicizing text. > $

[PHP] problem matching multiple times

2003-07-17 Thread Vince LaMonica
Hi All, I have a content management system that I'm building and I'm having issues matching a variable that needs to be replaced with rows from a database. Basicly I have something setup similar to bbcode, where a user enters html-like text for formatting - eg: [b]bold text[/b]. I'm now adding