PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Ok, so I have this function that I am using to stuff the year month and day into an array so that I can rearrange the order of them on a webpage. However, I was wondering if anyone could help me add functionality to this so that I could show the weekday, and the month name (i.e. January) too. I can not seem to get it to work. Let me know if you have a solution, thanks.
Since my knowledge of SQL is zilch, here's a bit of PHP pseudo-code for using [php_man]mktime[/php_man]() and [php_man]date[/php_man]() to get the result you want:
thanks for the code, however, I cannot seem to get this to work with the code I presented in my original post. i can not hard code the date like you have, it is being pulled from the db (column name is "releaseDate"), and I was tryin to use PHP instead of a sqlserver funtion in the sql statement to format the date. Still struggling
This way we get a better idea of what data is being returned from the db.
Please take a note:
You don't need to enter-scape-reenter-scape-reenter php (<?php code?>HTML<?php code?>) to print things on output. Take a look to [php_man]strings[/php_man] reference.
Try and use long <?php ?> to enclose PHP code due to compability issues. Read this thread.
Always use identention to your code, it helps when trying to findo bugs and make your code readble and professional. Read the Chapter 4. Coding Standards of the PEAR Manual.
Well, please post the output of the above code and show us what you're getting from the db.
thanks for the tips first off. secondly i made those changes and it returns the same thing as before. so for a news release that had a releaseDate column entry in the DB of 2003/09/03 (yyyy/mm/dd), it shows up like this.