php - get the next thursday relative to a particular date -


If the date of passage is not guru, then I would like to relate to a particular date next Thursday. It has gone with how far the code has gone.

  & lt ;? Php $ string = '2014.07.16'; $ Date = DateTime :: Creation Form Format ("Y.M.D.", $ string); $ Result = $ date-> Format ("D"); If ($ result! = 'Gurus') {$ result2 = strtotime ('next Thursday'); Echo Date ('Y.M.D', $ Result 2); }? & Gt;   

In the above code, variable $ string is the date passed which is 'Mercury', I would like to get '2014.07.16' which is relative to next Thursday 2014.07. 17 '. This means that if the $ string is '2014.07.21' which is a mon, then the return date will be '2014.07.24' which is available '2014.07.31' at this time compared to '2014.07.21' next Thursday.

How do I get the string next to a string (pass date) next Thursday

Thank you.

try it

  $ string = '2014.07.16' ; $ Date = DateTime :: Creation Form Format ("Y.M.D.", $ string); $ Result = $ date-> Format ("D"); If ($ result! = 'Gurus') {$ result2 = strtotime ('Next Thursday', strtotime ($ date-> format ("D-M-Y")); Echo Date ('Y.M.D', $ Result 2); }        

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -