Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

? Proper header() code ? 1

Status
Not open for further replies.
they are both fine.

this would not be fine
Code:
header('Location: $url');
as variables are not expanded within single quotes.
 
Thanks for the reply. The second header() example of my OP is what I have been and will continue to use now.
 
there is some evidence to suggest that this form
Code:
header('Location:'.$url);
is materially faster.

this applies across all string functions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top