I have a variable I am returning from a MySQLI Select Statement. It is being loaded into an Associative Array and I would like to format the display of that date.
The variable is $rsNotShowing[‘lastmodified’];
I have tried numerous ways to set the date format but have not had any luck on getting the right display without actually changing the date to the current date. I want the value of the date to stay as the database value but be displayed as M d, Y
Could someone please give me a suggestion? This has driven me batty for a couple days now.
No prob. When in doubt, check PHP.net - there are many useful examples in the comments of the function pages… you’ll usually find several ways to do what your’e looking for…
If you look at the docs for [fphp]date[/fphp] you see that the second (optional) argument is an integer timestamp. So you just needed to convert the string from mysql into a timestamp.