hmm I have an array of strings and an equal sized array of replacement strings I want to plug them into preg_replace

include() [function.include]:

PHP 5.1.0 or above
Why not just use date();?

I am pulling the raw date from a database

In what format?

gmdate() format

So it’s already formatted as a date?
What are you trying to do with it?

i am trying to format it by timezone for the client computer

ereg(‘^Content-Type: multipart/alternative; boundary=”(.*)”$’,$value,$temp)

and i am trying to show it as am/pm not military time

then date(‘h:i:s a’,$timestamp);

yupp just googled that up, I didnt know you can also format with date()
thanks

Yah. [0-9\-\.]* _should_ match… but it doesn’t seem to when I tested it a sec ago
Kinda odd

actually, it would be more than that, cuz you’d need to get the clients timezone

The date from the DB is pre formatted tho, so you couldn’t pass it to date() IIRC

It is formatting the timezone which will trick me

The second parameter must be an integer

jstephenson, not but if you did a date(‘h:i:s a’,strtotime($dbdate)) that would work, still need to get the timezone though

I can store the timezone in the database along with the username
I dont know how to store it

Yeah, strtotime() ^^

Smarty

*
To prove that you're not a bot, enter this code
Anti-Spam Image

Comments are closed.