A tragedy of the php array ?. Copy the code as follows: $ a1; $ b2; $ tarray (array (a, string, $ field [a]), name if ($ a $ B) {array (B, 1)}); print_r ($ t); exit; 1. the length of the array is long. No note
The 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. the length of the array is long. Not noticed
2. the development code does not promptly clear the cache .... The tragedy begins here.
The following is the correct usage:
$ A = $ B? Array ('sdesc', '1'): array ('sdesc', '2 ')
The 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;
The http://www.bkjia.com/PHPjc/323351.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/323351.htmlTechArticle code is as follows: $ a = 1; $ B = 2; $ t = array ('A', 'string', $ field ['A']), // name: if ($ a ==$ B) {array ('B', '1')}); print_r ($ t); exit; 1. the length of the array is long. No note...