dimanche 22 février 2015

Javascript Timer + PHP Array Variable from SQL Database


I've been struggling with this issue all day



<script type="text/javascript">
$(".getting-started")
.countdown("2016/01/01", function(event) {
$(this).text(
event.strftime("%D days %H:%M:%S")
);
});
</script>


Im using the above Javascript timer code for a simple and easy countdown for my project. However, when I attempt to do the following:



<script type="text/javascript">
$(".getting-started")
.countdown("*<?php SOME..VARIABLE ?>*", function(event) {
$(this).text(
event.strftime("%D days %H:%M:%S")
);
});
</script>


To replace the countdown target date, the timer disappears. I'm also attempt to insert the php variable from an echo array script printed as a table and have each <td> list the corresponding countdown date by a unique identifier. Can some one please help?





Aucun commentaire:

Enregistrer un commentaire