Solved

date

Posted on 2004-08-24
2
233 Views
Last Modified: 2008-03-06
I can't get line " print ("<td align=left nowrap class='smallfont'>(date("l F d, Y", $LastMod))</td>");
 " to be in it's correct format. I like to be able to use it's class. It can tricky sometime creating tables inside a php script.

<?
  $LastMod = filemtime("MyAdministrator.mdb");
      print ("<table width=100% cellpadding=0 cellspacing=0>");
      print ("<tr>");
      print ("<td align=left nowrap class='smallfont'>&nbsp;&nbsp;&nbsp;Last modification was: <br></td>");
      print ("<td>&nbsp;&nbsp;&nbsp;</td>");
      print ("<td align=left nowrap class='smallfont'>(date("l F d, Y", $LastMod))</td>");
      print ("</tr>");
      print ("</table>");
?>       
0
Comment
Question by:imaw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 1

Expert Comment

by:LiquidIce911
ID: 11886575
why are you doing a bunch of prints? instead just do one print (I use echo personally) like

echo '<table width=100% cellpadding=0 cellspacing=0>\n
     <tr>\n
     <td align=left nowrap class='smallfont'>&nbsp;&nbsp;&nbsp;Last modification was: <br></td>\n
     <td>&nbsp;&nbsp;&nbsp;</td>\n
     <td align=left nowrap class="smallfont">('.date("l F d, Y", $LastMod).')</td>\n
     </tr>\n
     </table>\n';

you can take out the \n if you dont want the new lines

what are you trying to do with the Date ? if you show me an example of how you want to be formatted I will tell you how to do it.
0
 
LVL 1

Accepted Solution

by:
LiquidIce911 earned 500 total points
ID: 11886582
sorry you have to change the other class='smallfont' to class="smallfont"
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question