Copy CodeThe code is as follows:
$a = 1;
$b = 2;
$t = Array (
Array (' A ', ' string ', $field [' a ']),//Name
if ($a = = $b) {Array (' B ', ' 1 ')}
);
Print_r ($t);
Exit
1, because the array length is longer. Didn't notice.
2, development code did not clean up the cache in time .... This is where the tragedy begins.
The following is the correct usage
$a = = $b? Array (' Sdesc ', ' 1 '): Array (' Sdesc ', ' 2 ')
Copy CodeThe code is as follows:
$a = 1;
$b = 2;
$t = Array (
Array (' A ', ' string ', $field [' a ']),//Name
$a = = $b? Array (' B ', ' 1 '): Array (' B ', ' 2 ')
);
Print_r ($t);
Exit
http://www.bkjia.com/PHPjc/323351.html www.bkjia.com true http://www.bkjia.com/PHPjc/323351.html techarticle Copy the code as follows: $a =1; $b =2; $t = Array (' A ', ' string ', $field [' a ']),//name if ($a = = $b) {Array (' B ', ' 1 ')}); Print_r ($t); Exit 1, because the array length is longer. No note ...