Array
(
[0] + = trademark Name
[1] = Yao Li life
[2] = = Registration number/Application number
[3] = 4576058
[4] = = International Classification No.
[5] = 25
[6] = = Application Date
[7] = 2005/4/1
[8] = = Applicant's name (Chinese)
[9] = Schnenpo
[+] = Applicant's address (Chinese)
[One] = No. 155th, Ying Long Road, Jinjiang town, Fujian province, China
[+] = Applicant's name (English)
[+] =
[+] = Applicant's address (English)
[+] =
[+] + trademark image
[+] =
[+] = similar Group
[+] + 2501 2507 2508
[+]-Product Service list
[x] = clothing; shoes; shirts; underwear; trousers; caps; leather garments; skirts; suits; bras;
[+] = Preliminary Notice period No.
[+] = 1135
[+] = Registration Notice period No.
[+] = 1147
)
There is such an array, how to reorganize him into this:
Array
(
[Trademark name]-Yao Li Life
[Registration number/application number] = 4576058
[International Classification No.] = 25
[Application Date]-2005/4/1
[Applicant Name (Chinese)] = = Schnenpo
[Applicant Address (Chinese)] = 155th, Ying Long Road, Jinjiang, Fujian, China
[Applicant Name (English)] = =
[Applicant Address (English)] = =
[trademark image] = =
[Similar Group] = 2501 2507 2508
[List of goods and services] = clothing; shoes; shirts; underwear; trousers; caps; leather garments; skirts; suits; bras;
[Preliminary notice period] = 1135
[registration notice Period] = 1147
)
Can I ask whether it can be implemented, to put out the source code, thank!!!!!
Reply to discussion (solution)
$a = Array ( 0 = ' trademark name ', 1 = ' Yao Li life ', 2 = ' Registration number/application number ', 3 = ' 4576058 ', 4 = ' International Classification number ',
5 [+], 6 = ' Application Date ', 7 = ' 2005/4/1 ', 8 = ' Applicant Name (Chinese) ', 9 = ' energy wave ', ' applicant ' Address (Chinese) ', one by one, ' 155th Ying Long Zhong Road, Jinjiang, Fujian province ', ' the applicant's name (English) ', ' + ', ' + ', ' Applicant ', [+] ', ' trademark image ', ' + = ' , ' like group ', ' 2501 2507 2508 ', 20 =& Gt ' List of goods and services ', ' + ' clothing, shoes, shirts, underwear, trousers, hats, leather garments, skirts, suits, bras ', ' the ' Preliminary examination notice period ', ' 1135 ', ' Registration notice period ', ' 1147 ', '), foreach (Array_chunk ($a, 2) as $v) $res [$v [0]] = $v [1];p rint_r ($res);
Array
(
[Trademark name]-Yao Li Life
[Registration number/application number] = 4576058
[International Classification No.] = 25
[Application Date]-2005/4/1
[Applicant Name (Chinese)] = = Schnenpo
[Applicant Address (Chinese)] = 155th, Ying Long Road, Jinjiang, Fujian, China
[Applicant Name (English)] = =
[Applicant Address (English)] = =
[trademark image] = =
[Similar Group] = 2501 2507 2508
[List of goods and services] = clothing; shoes; shirts; underwear; trousers; caps; leather garments; skirts; suits; bras
[Preliminary notice period] = 1135
[registration notice Period] = 1147
)
$arr = Array ( 0 = ' trademark name ', 1 = ' Yao Li life ', 2 = ' Registration number/application number ', 3 = ' 4576058 ', 4 = ' International Classification number ',
5 [+], 6 = ' Application Date ', 7 = ' 2005/4/1 ', 8 = ' Applicant Name (Chinese) ', 9 = ' energy wave ', ' shen ' Please address (Chinese) ', one-to-155th ', Ying Long Zhong Road, Jinjiang, Fujian province ', ' the applicant's name (English) ', " " "," "", "(English) ' applicant Address", C15/>15 "", "" "," trademark image of "," "," "," and "the similar group," and " 2501 2507 2508 ', =&G T "List of goods and services", " x" clothing, shoes, shirts, underwear, trousers, hats, leather garments, skirts, suits, bras, ', ' and ' first instance notice period ', ' 1135 ', "Registration notice period", "1147", $NEWARR = Array_chunk ($arr, 2); $a = Array_map (' Mkarr ', $NEWARR); functio n Mkarr ($n) {return array ($n [0] = $n [1]);} Var_dump ($a);
$out = Array (), $NEWARR = Array_chunk ($arr, 2), foreach ($newArr as $key = = $value) {$out [$value [0]] = $value [1]; }var_dump ($out);