RE: [PHP] string replace using ereg

2001-07-16 Thread scott [gts]
#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

RE: [PHP] string replace using ereg

2001-07-16 Thread scott [gts]
$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