[PHP] preg-replace-callback problem

2008-03-18 Thread Khaled Mamdouh
In url http://www.php.net/manual/en/function.preg-replace-callback.php I read this example: '.$input[1].'';}return preg_replace_callback($regex, 'parseTagsRecursive', $input);}$output = parseTagsRecursive($input);echo $output;?> example does not work if there are more deep stateme

Re: [PHP] Preg Replace

2004-01-05 Thread Jason Wong
On Tuesday 06 January 2004 12:35, Aaron Axelsen wrote: > I am fighting replacing items in the following hunk of code. This code is > pulled from a database, and then I want to replace items like <> with > the contents of a variable $name. > > I have tried code like: > preg_replace("/\<\<\?.*?\>\>

[PHP] Preg Replace

2004-01-05 Thread Aaron Axelsen
Hello, I am fighting replacing items in the following hunk of code. This code is pulled from a database, and then I want to replace items like <> with the contents of a variable $name. I have tried code like: preg_replace("/\<\<\?.*?\>\>/",$name,$paypal); However it doesn't work, any suggestion

[PHP] Preg replace & Query Problem

2002-07-29 Thread Alex Beauclair
Hi, I'm having trouble with preg_replace and a mysql query. Here's my code : $query = $db->query("SELECT style FROM ".$table_styles." WHERE id = '1'"); $r = $db->fetch_array($query); $style_1 = $r[style]; $query = $db->query("SELECT id, name, description FROM ".$table_categories.""); while($r =