J'ai un champ SQL au format date, je voudrai l'insérer dans une variable au format "Ymd", j'ai testé ceci mais ça ne fonctionne pas
Merci de votre aide.
Code : Tout sélectionner
$champ= date('Ymd', $_POST[ 'madate' ]);Code : Tout sélectionner
$champ= date('Ymd', $_POST[ 'madate' ]);Code : Tout sélectionner
$champ= date('Ymd', strtotime(str_replace('','-',$_POST['madate'])));