Fonction PHP strtotime()

Fonction PHP strptime()
Fonction PHP time()

Quelle est la syntaxe de la fonction strtotime() en PHP ?

strtotime(time, now);
ParamètreDescription
fiableObligatoire. Spécifie une chaîne de date/heure
maintenantOptionnel. Spécifie l'horodatage utilisé comme base pour le calcul des dates relatives

Exemples de la fonction strtotime()

Exemple 1. Dans cet exemple,

<?php
echo(strtotime("now") . "<br>");
echo(strtotime("3 October 2005") . "<br>");
echo(strtotime("+5 hours") . "<br>");
echo(strtotime("+1 week") . "<br>");
echo(strtotime("+1 week 3 days 7 hours 5 seconds") . "<br>");
echo(strtotime("next Monday") . "<br>");
echo(strtotime("last Sunday"));
?>
Fonction PHP strptime()
Fonction PHP time()

Restez à jour sur PHP !

Nous ne spammons pas !

en English
X
Remonter en haut