Ich möchte keine hinzufügen. der Woche im Datum. Ergebnis sollte im Datum "Y-m-d" kommen.Die Nummer der Woche zum Datum hinzufügen
Hier kommt "time_take" aus der Datenbank und das ist in Nr. wie 1, 2, 3, 5, 7 usw.
<?php
$date = $record['Child']['dob'];
$str = "'+".$Vac['Vac']['time_take']." week'";
echo date('Y-m-d',strtotime($str,strtotime($date)));
?>
Mein Ergebnis "1970-01-01"
Dies ist das Format des Datums in der Datenbank kommt.
Hilf mir.
Wollen Sie Woche nach dem ganzen Jahr oder in bestimmtem Monat? – Kunal
Welches Format hat das dob in '$ record ['Child'] ['dob']' – RiggsFolly
Ich aktualisiere meine Frage als Antwort auf Ihre Frage. – AmarpremCool