Forum Moderators: coopster

Message Too Old, No Replies

Zero not needed

         

Dexie

9:50 am on Aug 1, 2005 (gmt 0)

10+ Year Member



Hi, this code:

<?php
echo date("l, \\t\he dS of F, Y,");
?>

ends up like this:

Monday, the 01st of August, 2005

Any ideas how to exclude the zero at all please?

Any help appreciated.

dmorison

9:58 am on Aug 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think you just need to use "j" instead of "d" for the day of the month.

chrisjoha

10:05 am on Aug 1, 2005 (gmt 0)

10+ Year Member



Check which flags to use: [php.net...]

Dexie

10:06 am on Aug 1, 2005 (gmt 0)

10+ Year Member



Many thanks for that friend - much appreciated.

I assume there won't be any other probs later in the month - with nds, rds or ths?

Dexie

10:20 am on Aug 1, 2005 (gmt 0)

10+ Year Member



Many thanks Chris, that page is going to be very useful - much appreciated.

chrisjoha

11:27 am on Aug 1, 2005 (gmt 0)

10+ Year Member



In case you didn't know - a very good feature with www.php.net is that you can always append /function_name to the url and it will redirect you to the documentation. The documentation, and it's comments are often all you need to get startet. I use it all the time.

Dexie

1:15 pm on Aug 1, 2005 (gmt 0)

10+ Year Member



Sorry Chris, that just went flying straight over my head ;-) How do you mean?

chrisjoha

1:28 pm on Aug 1, 2005 (gmt 0)

10+ Year Member



Well, if you have a question related to a php function you may very easily find the answer in the documentation or the user contributed comments to it. The documentation is found at [php.net...]

For instance, your first post was related to the date() function. As I already told you, the answer is found at [php.net...]

Let us say that you're reading a file, and have some questions about the php function file_get_contents() - you will most likely find the answer at [php.net...]

See? Very handy feature ;)

Dexie

1:31 pm on Aug 1, 2005 (gmt 0)

10+ Year Member



Got it, many thanks for your help.