How To Use Inline If In Php

I am going to share how To use Inline If In PHP. We can use inline if because if you can use normal if and if else statement it is very long process. So avid long process you can use inline. But everywhere you do not use inline if. where you display only message data you use inline function.

Example


echo (($status == 1) ? "text1" :(($status  == 2) ? "text2" : (($status == 3) ? "text3" : "Created")));
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments