Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]Code: Select all
$variable["new"]="hi";
$variable["cow"]="wow";
$string="nice to meet you [phpfile=new]";
$pattern='/\[phpfile=(\w+)\]/i';
$replace=$variable["$1"];
preg_replace($pattern,$replace,$string);[phpfile=new]
with:
hi (from variable $variable["new"])
but the server says $1 is not registered.
any help is appreciated, thx.. =p
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]