Either with the DateTime API (requires PHP 5.3+):
$dateTime = DateTime::createFromFormat('F d, Y', 'Apr 30, 2010');
echo $dateTime->format('Y-m-d');
or the same in procedural style (requires PHP 5.3+):
$dateTime = date_create_from_format('F d, Y', 'Apr 30, 2010');
echo date_format($dateTime, 'Y-m-d');
or classic (requires PHP4+):
$dateTime = strtotime('Apr 30, 2010');
echo date('Y-m-d', $dateTime);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…