Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はPHPを使用しており、動的な変数番号を持っており、代わりに日付を作成したいと考えています.
$number = 4;
1日後の日付を作成できます
echo date('c', strtotime('+1 day'));
特定の日数、つまり日数の後に日付を作成したい場合はどうすればよいですか$number。
$number
に代わって日付を作成するにはどうすればよいですか$number。
私があなたを正しく理解していれば、次のようなことができます:
$number = 4; $days = "+".$number." day"; echo date('c', strtotime($days));
これがあなたのやりたいことではない場合は、質問を明確にしてください