Loop is not working when displaying
Posted: Mon Oct 01, 2007 3:26 am
I hope i am posting in the right place, (involves both javascript and php).
i downloaded to display counter from,
http://www.dynamicdrive.com/dynamicinde ... lcount.htm
treid to implement it using a loop (i have to display counter for each event).
This is displaying correctly only for one pools, for the rest of them i am getting,
Debug Mode on!
Current Local time: Monday, October 01, 2007 8:25:34 AM
Verify this is the correct current local time, in other words, time zone of count down date.
Target Time: NaN
Verify this is the date/time you wish to count down to (should be a future date).
NaN days NaN hours NaN minutes NaN seconds left until launch time
i downloaded to display counter from,
http://www.dynamicdrive.com/dynamicinde ... lcount.htm
treid to implement it using a loop (i have to display counter for each event).
Code: Select all
echo "<body>";
date('M d, Y H:i:s');
$i=0;
$query_pools=mysql_query("SELECT * FROM pools");
while($fetch_pool_det=mysql_fetch_array($query_pools))
{
$pool_draw_date=$fetch_pool_det['pool_draw_date'];
$exp_date_time=explode(' ',$pool_draw_date);
$date=$exp_date_time[0]; $time=$exp_date_time[1];
$exp_date=explode('-', $date);
$month_array=array(1=>January, February, March, April, May, June, July, August, September, October, November, December);
$formated_date=$month_array[$exp_date[1]].' '.$exp_date[2].','.$exp_date[0];
$i++;
echo "<div id=\"cdcontainer_$i\"></div>
<script language='javascript'>
var launchdate=new cdLocalTime(\"cdcontainer_$i\", \"server-php\", 0, \"$formated_date $time\", \"debugmode\")
launchdate.displaycountdown(\"days\", formatresults2)
</script>";
}
echo "</body>";Debug Mode on!
Current Local time: Monday, October 01, 2007 8:25:34 AM
Verify this is the correct current local time, in other words, time zone of count down date.
Target Time: NaN
Verify this is the date/time you wish to count down to (should be a future date).
NaN days NaN hours NaN minutes NaN seconds left until launch time