Re: [PHP] ereg_replace or chr bug?

2002-03-28 Thread Ando
ot;), which is not the > same as chr(45). > Hence, ereg_replace() fails and simply returns the original string, $text. > > -Original Message- > From: Ando [mailto:[EMAIL PROTECTED]] > Sent: Thursday, March 28, 2002 7:08 AM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] e

RE: [PHP] ereg_replace or chr bug?

2002-03-28 Thread Rick Emery
sage- From: Ando [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 28, 2002 7:08 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] ereg_replace or chr bug? Not sure what you mean here $text= ereg_replace('&#([0-9]+);' , chr('\1') , $text); should replace for example "A&qu

Re: [PHP] ereg_replace or chr bug?

2002-03-28 Thread Ando
m the manual for chr() > > Returns a one-character string containing the character specified by ascii. > > It replaces one (1) character, not a string > > -Original Message- > From: Ando [mailto:[EMAIL PROTECTED]] > Sent: Thursday, March 28, 2002 6:59 AM > To: [EMAIL PRO

RE: [PHP] ereg_replace or chr bug?

2002-03-28 Thread Rick Emery
PHP] ereg_replace or chr bug? Ok, what i wanna do is replace the codes in html with ascii equivalents: $text= ereg_replace('&#([0-9]+);' , chr('\1') , $text); But somehow it doesnt work, i have no idea why. When i use $text= ereg_replace('&#([0-9]+);' , '\1&#x

[PHP] ereg_replace or chr bug?

2002-03-28 Thread Ando
Ok, what i wanna do is replace the codes in html with ascii equivalents: $text= ereg_replace('&#([0-9]+);' , chr('\1') , $text); But somehow it doesnt work, i have no idea why. When i use $text= ereg_replace('&#([0-9]+);' , '\1' , $text); it replaces everything correctly But $text= ereg_replace