Re: [PHP] Escaping characters won't work

2002-11-15 Thread @ Edwin
Hello, "Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote: > At 23:53 14.11.2002, Lars Espelid said: > [snip] > >Try to execute this code: > >if (ereg[^0-9], $num)) > >print "That's not a number!"; > > > >result: parsing error, expects ')' on the if-line.

Re: [PHP] Escaping characters won't work

2002-11-14 Thread Ernest E Vogelsinger
At 23:53 14.11.2002, Lars Espelid said: [snip] >Try to execute this code: >if (ereg[^0-9], $num)) >print "That's not a number!"; > >result: parsing error, expects ')' on the if-line. You forgot an opening bracket, and need to quote the regex, like if

Re: [PHP] Escaping characters won't work

2002-11-14 Thread John Nichel
Hello again... Lars Espelid wrote: Hello, I'm running Apache 1.3.26, PHP 4.0.5 and WinXPpro. My problem is as follows: Try to execute this code: if (ereg[^0-9], $num)) print "That's not a number!"; result: parsing error, expects ')' on the if-line. This one does have a parse error

[PHP] Escaping characters won't work

2002-11-14 Thread Lars Espelid
Hello, I'm running Apache 1.3.26, PHP 4.0.5 and WinXPpro. My problem is as follows: Try to execute this code: if (ereg[^0-9], $num)) print "That's not a number!"; result: parsing error, expects ')' on the if-line. Have also tried other expressions where I escape characters. They won't work

Re: [PHP] Escaping Characters

2001-04-25 Thread Yasuo Ohgaki
My previous post is a bit misleading. ""Wade"" <[EMAIL PROTECTED]> wrote in message 9c6dcb$h8e$[EMAIL PROTECTED]">news:9c6dcb$h8e$[EMAIL PROTECTED]... > Aside from " (quotes), which HTML characters should be preceded with a \ > (backslash) to avoid parsing errors? No and Yes. NO: You don't have

RE: [PHP] Escaping Characters

2001-04-25 Thread PHPBeginner.com
MAIL PROTECTED] www.phpbeginner.com -Original Message- From: Wade [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 25, 2001 8:47 PM To: [EMAIL PROTECTED] Subject: [PHP] Escaping Characters Aside from " (quotes), which HTML characters should be preceded with a \ (backslash) to avoid parsing

Re: [PHP] Escaping Characters

2001-04-25 Thread Yasuo Ohgaki
""Wade"" <[EMAIL PROTECTED]> wrote in message 9c6dcb$h8e$[EMAIL PROTECTED]">news:9c6dcb$h8e$[EMAIL PROTECTED]... > Aside from " (quotes), which HTML characters should be preceded with a \ > (backslash) to avoid parsing errors? No. > > I have the following, which I have in an .inc file outside my

[PHP] Escaping Characters

2001-04-25 Thread Wade
Aside from " (quotes), which HTML characters should be preceded with a \ (backslash) to avoid parsing errors? I have the following, which I have in an .inc file outside my web root. I have tried sticking the \ in front of the # (pound) and the = (equal) -- not out of any reason, but more out of f

Re: [PHP] Escaping Characters - URL Encoding.

2001-04-24 Thread Sterling
H- Thank you very much! I feel kinda dumb. I think I'll take a break. 6 hours in front of a monitor is too much. 8^) Thanks for the assist. rawurlencode worked great. -Sterling Alexander Wagner wrote: > > Sterling wrote: > > $topic = "Aerospace & Commercial Space"; > > > > $link_value = st

Re: [PHP] Escaping Characters - URL Encoding.

2001-04-24 Thread Rasmus Lerdorf
> I've been able to escape the 'space' character in a variable so it can > be safely passed through a URL but I'm having trouble finding anything > that works for escaping the '&' ampsand. php.net/urlencode as for your code: > $topic = "Aerospace & Commercial Space"; > > $link_value = str_repla

Re: [PHP] Escaping Characters - URL Encoding.

2001-04-24 Thread Alexander Wagner
Sterling wrote: > $topic = "Aerospace & Commercial Space"; > > $link_value = str_replace("&", '%26', $topic); > $link_value = str_replace(' ', '%20', $topic); This should be $link_value = str_replace("&", '%26', $topic); $link_value = str_replace(' ', '%20', $link_value); Anyway, this is this wr

[PHP] Escaping Characters - URL Encoding.

2001-04-24 Thread Sterling
H- I've been able to escape the 'space' character in a variable so it can be safely passed through a URL but I'm having trouble finding anything that works for escaping the '&' ampsand. Here is a snippet of code. $topic = "Aerospace & Commercial Space"; $link_value = str_replace("&", '%26',