How to add number with PHP within function of Javascript like 2011? <SCRIPT> document.write("<font size=1>" + day + month); document.write(myweekday + ", " + 2011 + "</font>"); </SCRIPT>
daveVk
2:01 am on Dec 9, 2010 (gmt 0)
document.write(myweekday + ", " + 2011 + "</font>"); could be written as document.write(myweekday + ", 2011 </font>");
but suspect that is not the question ?
Can your not set year in the same way you set day month myweekday ?
document.write(myweekday + ", " + year + "</font>");
SteveWh
10:40 am on Dec 9, 2010 (gmt 0)
Not entirely sure this answers your question, either, but here's a possibility. The PHP code is run at serve-time, so it inserts the number into the JavaScript code, which gets run later, when it reaches the visitor's browser: