greetings message


/ Published in: PHP
Save to your folder(s)

this codings display welcome message , curent date and greetings


Copy this code and paste it in your HTML
  1. <html>
  2. <body>
  3. <?php
  4. // 01.display name with series
  5.  
  6. for($i=1; $i<=1;$i++)
  7. {
  8. echo $i;
  9. echo ". welcome to arasiyalkalam <br />";
  10. }
  11. echo "Word length of welcome to arasiyalkalam is = ";
  12. echo strlen("welcome to arasiyalkalam")."<br/>";
  13.  
  14.  
  15. // 02. display day
  16.  
  17. echo "Today is ";
  18. echo date ("D")."<br/>";
  19. echo "Date is ";
  20. echo date("d.m.Y");
  21.  
  22. // 03. display greetings using if else
  23.  
  24. if($d=="friday")
  25.  
  26. echo "Have a nice weekend";
  27. elseif ($d=="sun")
  28. echo "Have a nice sunday";
  29. else
  30. echo "<br/> Have a nice day";
  31.  
  32. ?>
  33. </body>
  34. </html>

URL: www.arasiyalkalam.com

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.