Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

if else if ternary php

var name = (variable === 1) ? 'foo' : ((variable === 2) ? 'bar' : 'baz');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #ternary #php
ADD COMMENT
Topic
Name
9+1 =