Dynamic Column Header Name
Dynamic Column Header Name
gunjannigam
Posts: 8Questions: 0Answers: 0
Hi,
I want my table to have dynamic column headers, i.e. column name will be refreshed after specific time interval. My column name depend upon current time. This is how my column names are decided
[code]
  Id  
<?php
date_default_timezone_set('Asia/Kolkata');
$timestamp = date("Y-m-d H:i:s");
for($i=0;$i<24;$i++)
{
$date_old = date("Y-m-d H:00:00",strtotime($timestamp)-$i*3600);
echo "".$date_old."";
}
?>
[/code]
If I use redraw only data is refreshed. Column name isn't. How do I do that?
I want my table to have dynamic column headers, i.e. column name will be refreshed after specific time interval. My column name depend upon current time. This is how my column names are decided
[code]
  Id  
<?php
date_default_timezone_set('Asia/Kolkata');
$timestamp = date("Y-m-d H:i:s");
for($i=0;$i<24;$i++)
{
$date_old = date("Y-m-d H:00:00",strtotime($timestamp)-$i*3600);
echo "".$date_old."";
}
?>
[/code]
If I use redraw only data is refreshed. Column name isn't. How do I do that?
This discussion has been closed.