I want to replace the string "[USER_NAME]" with the value in $user_name in my longer string: $emailbody.
Well - works fine except it doesnt replace the hole string - just the characters between the brackets.
$emailbody = "bla bla bla [USER_NAME] bla bla bla";
$emailbody = preg_replace( "[USER_NAME]", $user_name, $emailbody );
result:
$emailbody = "bla bla bla [George W. Bush] bla bla bla"
But im telling it to replace the brackets as well!!!!!!!!!!!!