Re: [PHP] Syntax checker? Character replacing

2009-03-06 Thread Adam
just clean up your code and it will work: http://www.google.ca/search?hl=en&q=php+rocks%21%21%21&meta='; if (isset($qString)) { $buffer = str_replace("&","&",$qString); } echo $buffer."\n"; ?> OUTPUT: C:\>php test.php http://www.google.ca/search?hl=en&q=php+rocks%21%21%21&meta= C:\> On F

Re: [PHP] Syntax checker? Character replacing

2009-03-06 Thread haliphax
On Fri, Mar 6, 2009 at 2:05 PM, Terion Miller wrote: > I have this and think maybe something is off, because if there is an amp (&) > in the location then it only displays a comma , and nothing else: > > if (isset($_SERVER['QUERY_STRING'])) {$Page .= ($_SERVER['QUERY_STRING']? > '?'. str_replace("

[PHP] Syntax checker? Character replacing

2009-03-06 Thread Terion Miller
I have this and think maybe something is off, because if there is an amp (&) in the location then it only displays a comma , and nothing else: if (isset($_SERVER['QUERY_STRING'])) {$Page .= ($_SERVER['QUERY_STRING']? '?'. str_replace("&","&",$_SERVER['QUERY_STRING']) : '');} is that wrong?