EU and US manage dates with different formats,
in PHP you can convert the date format from European style to US style using DateTime::createFromFormat
11788381-php-mysql-development

It is the right way to do the job, but surfing on the web I found an alternative way that helps me when I have to prepare a field to store into a MySql database.

$var = '20/04/2012';
echo implode("-", array_reverse(explode("/", $var)));

The code is simple and self-explanatory, anyway it explodes the source string in substrings containing dd mm and yy then reverses the order of the elements of the array and, last, rebuilds the string using the minus sign as separator.

Gg

You can find the source of this tip at this link