#x27;=> 'BOB', );
$OPENTAG = "<<";
$CLOSETAG = ">>";
print preg_replace( "/$OPENTAG(.*?)$CLOSETAG/e", '$ASSIGN[$1]', $text );
> -Original Message-
> From: Jeroen Olthof [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 16, 2001
$text = "Hello there, <>.
My name is <>";
$ASSIGN = array(test => "this is a test", 'name'=> 'BOB', );
$OPENTAG = "<<";
$CLOSETAG = ">>";
print preg_replace( "/$OPENTAG(.*?)$CLOSETAG/e", '$ASSIGN[$1]', $text );
prints:
Hello there, this is a test.
My name is BOB
To do what you want, throw
2 matches
Mail list logo