• 14

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Is there any difference in strtotime +day or +days?

Was googling this, but couldn't find the answer. Was wondering, if there is a difference in these two scripts?

+3 day:

echo date( 'd.m.Y H:i:s', strtotime( '+3 day' ) );

+3 days:

echo date( 'd.m.Y H:i:s', strtotime( '+3 days' ) );

The output is exactly the same.

So is that implemented to make sure people get less errors or what?
And witch one should be preferred to use?

That is basically same thing, and for usability and pretty purposes:

strtotime( '+1 day' );
strtotime( '+3 day' );
strtotime( '+1 days' );
strtotime( '+3 days' );
strtotime( '+1 weeks' );
strtotime( '+3 week' );

You can use the one you like more, basically the one that defines de number, 1 day, 3 days

  • 16
Reply Report

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags

Related Questions