PHP email help
- Started
- Last post
- 7 Responses
- ********
Code: http://www.design-portfolio.info…
If $ date is a timestamp, how do I format that (in the email) as D-d-y? Or whatever?
I thought I had this down but obviously not...
- ********0
...quickly! I'm running out of hair.
I'm mighy surprised I got it to send an email at all...
- ********0
Fuck PHP in the ass.
I'm going to quit and become a farmer.
- Nac0
do you meant like:
$date_format = date("m/d/y", $date_timestamp);
?
- Nac0
are you separating the year month and day from the db?
$posted = $row["posted"];
list($year, $month, $day) = explode('-', $posted);
$posted_timestamp = mktime(0, 0, 0, $month, $day, $year);
$posted_format = date("m/d/y", $posted_timestamp);i apologize if I am not reading the question correctly.
- enobrev0
depends on the $date var, but try
$msg = 'Event added for Date:' . "\t" . date('D-d-Y', strtotime($date)) . "\n";
- ********0
Thanks Guys.
Enobrev - that returned:
Thu-01-1970The timestamp actually is;
20040806103236I think something maybe wrong somewhere else... i tried date() with that to... returned;
Tue-19-2038!!Time to try something else.
- rabattski0
check the examples & comments: