Php program to greet the user based on time


Asked by admin @ in Computer Science viewed by 319 People


Write a php program to greet the user based on time

Answered by admin @



Answer:

<?php

function greeting(){

$timeOfDay = date('a');

if($timeOfDay == 'am'){

return 'Good morning, welcome to our site';

}else{

return 'Good afternoon, welcome to our site';

}

}


Similar Questions

Write a php program to read the employee details

Asked by admin @ in Computer Science viewed by 307 persons

Write a php program to read the employee details

In the world of analytics the time the user

Asked by admin @ in Computer Science viewed by 290 persons

In the world of analytics, the time the user spent on your site is considered which type of data? A Conversion B Clocking C Metric D Dimension

The program which forms interface between user and computer is

Asked by admin @ in Computer Science viewed by 243 persons

The program which forms interface between user and computer is a. compiler b.jclc.hardwared.os

When a user views a page containing a javascript program

Asked by admin @ in Computer Science viewed by 264 persons

When a user views a page containing a javascript program which machine actually executes the script?

The tradeoff between user experience and delivery time is

Asked by admin @ in Business Studies viewed by 331 persons

The trade off between user experience and delivery time is 1) that delivery time is longer if user experience has to be better . 2) they do not have any …

User segments can be created based on _________

Asked by admin @ in English viewed by 392 persons

User segments can be created based on _________. Demographics Psychographics All the options User Expertise

The base of a triangular field is three times

Asked by admin @ in Math viewed by 306 persons

the base of a triangular field is three times its height.if the cost of cultivating the field at rs 36 per hectare is rs 486.find its base height.

Which activity is an example of a time based goal

Asked by maham237 @ in Business viewed by 332 persons

A. Catherine plans to learn to play the guitar in the next few years. B. David wants to pay off his student loan as soon as possible. C. Farah wants …

Programs that create text based documents

Asked by maham237 @ in Computers And Technology viewed by 314 persons

Which software is primarily used to create text-based documents?

Name the programming model for developing hadoop based applications

Asked by admin @ in Computer Science viewed by 332 persons

Name the programming model for developing hadoop based applications

Overcoming fixed mindset: a step-by-step guide to cultivating a growth mindset

Asked by wiki @ in Health viewed by 1078 persons

Which of the following would best complete this list?

Asked by wiki @ in Social Studies viewed by 615 persons

What had the king decided to do before he saw the spider

Asked by vanshika149 @ in English viewed by 953 persons

Describe the karez in your own words

Asked by rajesh064 @ in English viewed by 1084 persons

Most viewed questions in Computer Science


A programmer mistakenly writes gor instead of for

Asked by admin @ in Computer Science viewed by 18990 persons


Domestic data entry operator ncert book class 9 solutions

Asked by admin @ in Computer Science viewed by 15731 persons


Information technology code 402 class 9 solutions chapter 1

Asked by admin @ in Computer Science viewed by 10929 persons



Ncert solutions for class 8 computer chapter 1 computer system

Asked by admin @ in Computer Science viewed by 10373 persons


A scrum team works on a 4 weeks sprint

Asked by admin @ in Computer Science viewed by 8696 persons


Which of the following occupies more memory in c

Asked by admin @ in Computer Science viewed by 8103 persons



A database of motor vehicles has the base entity

Asked by admin @ in Computer Science viewed by 7818 persons


The network architecture can be termed as a mcq

Asked by admin @ in Computer Science viewed by 6451 persons


Cat5 and cat6 cabling refer to which reference model layer

Asked by admin @ in Computer Science viewed by 5750 persons



Class 7 computer chapter 3 questions and answers

Asked by admin @ in Computer Science viewed by 5657 persons


Choose the correct options about usability and user experience

Asked by admin @ in Computer Science viewed by 5443 persons


Which advocates daily team meetings for coordination and integration

Asked by admin @ in Computer Science viewed by 4952 persons



Which three security features match the database security level

Asked by admin @ in Computer Science viewed by 4943 persons


Which of the dbms package is not available

Asked by admin @ in Computer Science viewed by 4661 persons


________ aid a business grow and attain its objectives

Asked by admin @ in Computer Science viewed by 4462 persons