Interviewer And Interviewee Guide

Sr. PHP Programmer Interview Question:

What is the value of "$day" in the below code?

Submitted by: Muhammad
$wed= 1;
$day = ($wed==1) ? 'today' : 'tomorrow';
// $day is now set to 'today'

Companies often ask about the ternary operator (?). which is simply a shorthand for if else statements.
Submitted by: Muhammad

Read Online Sr. PHP Programmer Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.