Posted on 2004-08-24
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>");
Question by:imaw
  • 2

Expert Comment

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
     <td align=left nowrap class='smallfont'>&nbsp;&nbsp;&nbsp;Last modification was: <br></td>\n
     <td align=left nowrap class="smallfont">('.date("l F d, Y", $LastMod).')</td>\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.

Accepted Solution

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

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

708 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now