Answers for "php if statements single line"

PHP
5

write if and else in one line php

$result = ($data->status == 1) ? 'active' : 'disable'
Posted by: Guest on November-08-2020
6

php multiple line string

//use EOD function for multiple line variable
$variable=<<<EOD
  this is line1
  this is line2
  EOD;
Posted by: Guest on June-09-2020

Browse Popular Code Answers by Language