header() behaviour

From: Date: Tue, 28 Oct 2003 22:09:55 +0000
Subject: header() behaviour
Groups: php.internals 
Request: Send a blank email to internals+get-5051@lists.php.net to get a copy of this message
Apologies if this is the wrong list. I've just been running into some wierd issues regarding the header() function, which I'm not 100% sure if it's desired behaviour or not. Basically, we have a few variables such as: $var = "foo=1&bar=2"; Now this variable gets used in 2 cases. The first is as a direct link in an <a href>. The second is as an automatic redirect using header("Location: blah"); This works great, but in an order to make this page fully html/xhtml compliant, we've been changing $var so that it's: $var = "foo=1&amp;bar=2"; Now, for the first case - this works absolutly fine. For the second case however, header passes the full variable without resolving &amp; to &. I can't figure out if this is desired or not, if it's not, I'll happily draft up a patch to alter the behaviour - I just want to make sure before I do. Cheers, -- Gareth Ardron

« previous php.internals (#5051) next »