Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the ternary conditional operator in php?



What is the ternary conditional operator in php?..

Answer / Sudhir Kumar Gupta

In PHP, the 'ternary conditional operator' (also known as the 'conditional expression') is a shorthand way to write an if-else statement. It has the format: (expression1) ? (expression2) : (expression3). For example: <?php $var = 10; $result = ($var > 5) ? 'Greater than 5' : 'Less than or equal to 5'; ?>

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More WordPress Interview Questions

Can you host WordPress using Amazon web services such as EC2, RDS, EBS, etc.?

1 Answers  


How do I disable trackbacks and pingbacks?

1 Answers  


Why wordpress is so popular?

1 Answers  


Is there a wordpress certification?

1 Answers  


How do I put a youtube social link on facebook?

1 Answers  


What are shortcodes in wordpress?

1 Answers  


What's the difference between a blog and a website?

1 Answers  


How do I restore my wordpress theme?

1 Answers  


How we can update wordpress?

1 Answers  


Tell me do you know why doesn't the following code print the newline properly?

1 Answers  


Can I build wordpress site offline?

1 Answers  


When will you not be able to see the plugin menu in a wordpress site?

1 Answers  


Categories