473,666 Members | 2,116 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 1447
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
2927
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
1718
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 classes & method depends on the meta table in the database,here is my problem 1) One method I generated works when it was called, but another set of method does not work, it generate the following error
6
19023
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 submitting user information into my creation script, I get the following error from the page that is suppose to insert the user data into the database, create a code, then send an email out for verification. Parse error: parse error, unexpected $end in...
8
7697
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 a procedure to drop the storage of a table used... when its record count exceeds 500. BEGIN i:= 0; FOR CC IN NLD LOOP
0
8356
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8781
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8640
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7386
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5664
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4369
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2771
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 we have to send another system
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.