Solved

date

Posted on 2004-08-24
2
230 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
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
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.

730 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