[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: ?php$input = plain [indent] deep [indent] deeper [/indent] deep [/indent] plain;function parseTagsRecursive($input){$regex = '#\[indent]((?:[^[]|\[(?!/?indent])|(?R))+)\[/indent]#';if

[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 name with the contents of a variable $name. I have tried code like: preg_replace(/\\\?.*?\\/,$name,$paypal); However it doesn't work, any suggestions

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 name with the contents of a variable $name. I have tried code like:

[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 =