<?php include 'exe4.php'; displayHeader('Heading h1', 'Sub Heading h2'); $comment = array([0], [1], [2], [3]); $comment[0] = createComment('Ramasubbaiya', 'Awesome Program!', strtotime('30-07-2014 06:30:55 AM')); $comment[1] = createComment('Ramasubbaiya', 'Awesome Program!', strtotime('04-03-2014 06:30:55 PM')); $comment[2] = createComment('Ramasubbaiya', 'Awesome Program!', strtotime('23-12-2014 06:30:55 AM')); $comment[3] = createComment('Ramasubbaiya', 'Awesome Program!', strtotime('07-04-2010 06:30:55 PM')); foreach ($comment as $k => $v) { outputComment($v) . '<br>'; }
<?php include "exe3.php"; function outputComment($output) { $arr = createComment('Ram', 'Awesome Program!', '6:30'); echo 'Name : ' . $arr[0] . '<br>'; echo 'Comment : ' . $arr[1] . '<br>'; echo 'Time : ' . $arr[2] . '<br>'; } outputComment($output); $time1 = new time('07:08:00'); $time2 = new time(); $interval = $time1->diff($time2); echo $interval->format('%R%a days');
<?php include 'util.php'; saveComment("Rama", 'Awesome Program!', strtotime('2015/08/05 06:40:00')); saveComment("Leo", 'Awesome Program!', strtotime('2012/12/11 07:50:00')); saveComment("Matt", 'Awesome Program!', strtotime('2010/11/12 08:35:00')); saveComment("Nike", 'Awesome Program!', strtotime('2012/06/05 09:25:00')); //echo $saveComment(); $comments = loadComment(); foreach ($comments as $key => $val) { outputComment($val); }