n - Numeric representation of a month, without leading zeros
i - Minutes with leading zeros
etc etc
maccas
1:13 pm on Jan 22, 2006 (gmt 0)
ltrim [uk2.php.net], will remove all the 0's before another character. $arrival_display = ltrim($arrival_display, "0");
helenp
1:13 pm on Jan 22, 2006 (gmt 0)
Yes I know, but donīt know if can be used in this case, it is not question of an local date or any calculated date, it is an date from an form, so I have the var $arrival_display = $day .'-'. $monthyear[1] .'-'. $monthyear[0]; I could always put 9 str_replaces in of course.
maccas
1:19 pm on Jan 22, 2006 (gmt 0)
If you are only going from 01 - 09 you only need to replace the 0 in one str_replace
Maccas, that works perfect, expect that it only take away the first 0 and leave me with a date like this; 1-02-2006
helenp
1:27 pm on Jan 22, 2006 (gmt 0)
[quote="maccas"]If you are only going from 01 - 09 you only need to replace the 0 in one str_replace $arrival_display = str_replace("0", "", $arrival_display); [/quote] No, that takes away the cero in the year, the date format displayed by the form is: 01-02-2006 and I want to take away the cero in day and month before any other number