$type=grid$count=4$tbg=rainbow$meta=0$snip=0$rm=0$show=home

Checking current time and date using a simple PHP code

PHP is widely used server-side scripting language. It is designed for use with HTML and can be embedded insides of an HTML page. PHP is on...

PHP is widely used server-side scripting language. It is designed for use with HTML and can be embedded insides of an HTML page. PHP is one of the most popular language for web development and  its  main purpose is to make the web pages dynamic.

To create a PHP file you use as .php at the end to let the server interpret as PHP.

Let us write a simple lines of PHP code to check the Current Time, Month, Day and Date.

PHP CODE

<?php
  date_default_timezone_set("Asia/Calcutta");
  $time = date('h:i:sA');
  echo "<p><b>Current time : $time </b></p>";
  $today = date('F Y');
  echo "<p><b>Month : $today </b></p>";
  $today = date('d');
  echo "<p><b>Date : $today </b></p>";
  $today = date('l');
  echo "<p><b>Day : $today </b></p>";
   ?>


END...

COMMENTS

Name

css,17,html,7,php,2,python,1,tech,18,
ltr
item
iWriteLess Tech Blog: Checking current time and date using a simple PHP code
Checking current time and date using a simple PHP code
iWriteLess Tech Blog
http://www.iwriteless.com/2016/01/checking-current-time-and-date-using.html
http://www.iwriteless.com/
http://www.iwriteless.com/
http://www.iwriteless.com/2016/01/checking-current-time-and-date-using.html
true
2724151228810149585
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share. STEP 2: Click the link you shared to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy