[php]<?php header('Location: index.php'); ?>[/php]
Vs.
[php]<?php echo ''; ?>[/php]
Discuss…
[php]<?php header('Location: index.php'); ?>[/php]
Vs.
[php]<?php echo ''; ?>[/php]
Discuss…
No reason to echo html, other than that, what’s to discuss? Practically everything in programming have multiple solutions, some equal, other may have pros/cons depending on use/implementation.
e.g. Sometimes when I used Headers I got an error “Headers already sent” so I resorted to a Javascript redirection.
Then you should fix the early output instead of hacking a fix ^^