Solved

date

Posted on 2004-08-24
2
228 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

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…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

837 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