Jump to content

Do an Operation Within a Header?


dzwestwindsor

Recommended Posts

Hello!

 

I need a while loop that renders out part of my "header" redirect block.


<?php

header ('Location: /mylocation?'    /////this is where the header starts. however, for the rest of the header, it needs to be dynamic

$counter=1;  //I need to define some variables

while (babababa)   // and I need a while loop that renders out stuff for the header. 
{
Renders out stuff for the header
}

)     // and then finally i close the "header"

?>

 

However, apparently.. it's yelling at me for having dynamic stuff within the header.

 

 

Parse error: syntax error, unexpected T_WHILE in /var/www/ars/includes/common.inc(1699) : eval()'d code on line 18

 

 

So.... how would I put something dynamic, like a while loop or variables, within the "header" redirect block?

 

Thanks folks! Sorry if this is a bad question xD

 

Link to comment
https://forums.phpfreaks.com/topic/212194-do-an-operation-within-a-header/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.