How to get the current date and time in PHP

php coding need hai mujhy jo current date and time show kre Asia ka like India/Pakistan ka

Train Asked on November 12, 2018 in PHP.
Add Comment
1 Answer(s)
Best answer

// Change the line below to your timezone!
<?php date_default_timezone_set(‘Asia/Kolkata‘);
$date = date(‘m/d/Y h:i:s a’, time());
echo $date ?>

Admin Answered on November 12, 2018.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.