Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • try change finaldate format to "Y-m-d" [ echo date("Y-m-d",strtotime('"+newdate+"')) ] Commented Feb 6, 2017 at 5:27
  • i tried it but its not working @SarangaR Commented Feb 6, 2017 at 5:27
  • 2
    PHP executes on the server, then the server sends the page to the browser, and javascript runs. You can't just inject a javascript variable in PHP, it's too late Commented Feb 6, 2017 at 5:30
  • for change date format see stackoverflow.com/questions/33299687/… Commented Feb 6, 2017 at 5:37
  • I think, you are misunderstanding some principle of server side programming any way I think you hope following answer [ echo date("d/m/Y",strtotime(date('Y-m-d'))); ] or [ echo date('d/m/Y'); ] Commented Feb 6, 2017 at 5:38