Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
How is the ternary conditional operator used in PHP?
Home
PHP
How is the ternary conditional operator used in PHP?
+1
vote
asked
Jun 23, 2019
in
PHP
by
SakshiSharma
How is the ternary conditional operator used in PHP?
#php
#php-php
#php-server-monitor-script
#php-support
#mysql-php
#php-programmer
#php-development
#php-language
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
Jun 23, 2019
by
anonymous
It is composed of three expressions: a condition, and two operands describing what instruction should be performed when the specified condition is true or false as follows:
Expression_1?Expression_2 : Expression_3;
Your comment on this answer:
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Related questions
0
votes
Q: When is a conditional statement ended with endif?
asked
Jun 23, 2019
in
PHP
by
SakshiSharma
#php
#php-php
#php-server-monitor-script
#php-support
#mysql-php
#php-programmer
#php-development
#php-language
0
votes
Q: Explain how you can update Memcached when you make changes to PHP?
asked
Jun 23, 2019
in
PHP
by
SakshiSharma
#php
#php-php
#php-server-monitor-script
#php-support
#mysql-php
#php-programmer
#php-development
#php-language
0
votes
Q: How can we determine whether a PHP variable is an instantiated object of a certain class?
asked
Jun 23, 2019
in
PHP
by
SakshiSharma
#php
#php-php
#php-server-monitor-script
#php-support
#mysql-php
#php-programmer
#php-development
#php-language
0
votes
Q: How to initiate a session in PHP?
asked
Jun 23, 2019
in
PHP
by
SakshiSharma
#php
#php-php
#php-server-monitor-script
#php-support
#mysql-php
#php-programmer
#php-development
#php-language
0
votes
Q: How is it possible to cast types in PHP?
asked
Jun 23, 2019
in
PHP
by
SakshiSharma
#php
#php-php
#php-server-monitor-script
#php-support
#mysql-php
#php-programmer
#php-development
#php-language
0
votes
Q: How is a constant defined in a PHP script?
asked
Jun 23, 2019
in
PHP
by
SakshiSharma
#php
#php-php
#php-server-monitor-script
#php-support
#mysql-php
#php-programmer
#php-development
#php-language
0
votes
Q: How can we define a variable accessible in functions of a PHP script?
asked
Jun 22, 2019
in
PHP
by
SakshiSharma
#php
#php-php
#php-server-monitor-script
#php-support
#mysql-php
#php-programmer
#php-development
#php-language
0
votes
Q: How be the result set of Mysql handled in PHP?
asked
Jun 22, 2019
in
PHP
by
SakshiSharma
#php
#php-php
#php-server-monitor-script
#php-support
#mysql-php
#php-programmer
#php-development
#php-language
0
votes
Q: How can we connect to a MySQL database from a PHP script?
asked
Jun 22, 2019
in
PHP
by
SakshiSharma
#php
#php-php
#php-server-monitor-script
#php-support
#mysql-php
#php-programmer
#php-development
#php-language
0
votes
Q: How is it possible to set an infinite execution time for PHP script?
asked
Jun 22, 2019
in
PHP
by
SakshiSharma
#php-php
#php-server-monitor-script
#php-development
#php-support
#mysql-php
#php-language
#php-programmer
#php
...