php convert date now into a sql timestamp

an easy way to get the current date from php into a mysql or sql timestamp format, this uses the server time

Demo

PHP

echo $date = date("Y-m-d H:i:s");

Example

2019-12-05 12:39:46

Other Items in php
Page Views

This page has been viewed 53 times.

Search Code
Search Code by entering your search text above.
Welcome

This is my test area for webdev. I keep a collection of code snippits here, mostly for my reference. Also if i find a good site, i usually add it here.

❤👩‍💻🕹