473,507 Members | 2,405 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Very frustrating Parse error on Html table creation, using time().

karlectomy
64 New Member
Can anyone find the parse error on the fourth line of this stuff??

Expand|Select|Wrap|Line Numbers
  1. <table><tr>
  2. <td>Date</td>
  3. <?
  4. var $thisDate = time(); //NOW
  5. var $day1 = (7*3600); //One more day
  6. for($i = 7; $i>=0; $i--)
  7. {
  8. $d = $thisDate-($i*$day1);
  9. ?>
  10. <td><? echo(date('m-d', $d)); ?></td>
  11. <?
  12. }
  13. ?>
  14. </tr></table>
  15.  
Its very frustrating!

Karl
Oct 5 '07 #1
4 1444
Atli
5,058 Recognized Expert Expert
Hi Karl.

Try changing <? to <?php.

The former is a the short (lazy) version and needs to be enabled in order to work. It is disabled by default.

Edit:
And of course I totally missed the JavaScript like 'var' in front of your variables. Remove them and all will be fine.
Oct 5 '07 #2
pbmods
5,821 Recognized Expert Expert
Changed thread title to... ah, more accurately describe the problem.
Oct 5 '07 #3
karlectomy
64 New Member
Hey atli,

Thanks for the help. I figured it out before i read your post. It was the second thing. I've been programming in actionscript and got confused about variable declaration...

And Pb... "I'm sick of these very frustrating snakes on this very frustrating plane!" - Samuel L. Jackson (as edited by PbMods) :P
Oct 6 '07 #4
pbmods
5,821 Recognized Expert Expert
And Pb... "I'm sick of these very frustrating snakes on this very frustrating plane!" - Samuel L. Jackson (as edited by PbMods) :P
LOL!

Very nice.
Oct 6 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2913
by: josh dismukes | last post by:
/// here is the code i'm getting a parse error on the last line of the code which /// is </html> any help will be much appreciated. <?php session_start ();
0
1699
by: john | last post by:
Hi,All Gurus: It is kind of complicated, please bear with me and let me know if you have any questions. Thanks a lot in advance. John I have a csharp method, using emit to dynamically generate...
6
19010
by: Ehartwig | last post by:
I recently created a script for user verification, solved my emailing issues, and then re-created the script in order to work well with the new PHP 5 that I installed on my server. After...
8
7675
by: ananthaisin | last post by:
How to reduce the table size for any table while using truncate or delete statements. In oracle 8i it was truncating the storage space but in 10g it is not .... I have given truncate statement in...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7114
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7321
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
5623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5045
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1544
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
412
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.