Original address:
http://bbs.csdn.net/topics/390595542 4#
If the full page information is:
Array (...). [Sheet] = = Part information parts list [+] = [[+] = [[+]] = [[+] = [ [+] = [[[]] [[[]] = [[+]] [[+] = number of packages [+] = number of boxes [[+] = bin number [+] [] [[]] [[]] = [] = Actual number of boxes [[+]] = Real material receipt box number [[]/[+] = number of boxes [+] = [98] = 1 [[+] = 12606260 [+] = model [101] = 480 [102] = 480 [103] = [104] [106] = [4] [[]] + [+] = [107] ] = [108] = [109] = [[]] = [111] [[] = [] + [] = 2 [113] = 12615516 [114] + Throttle Controller control module [[+]-[+]-[+]-[117] = [118] [+] [119] + [[]] [[]] = [+] = 0ptyn007 [121] = [122] = [123] = [124] = [[]] = [126] = Supplier Signature Carrier Signature supplier Signature _____________ carrier Signature ____________ _ [127] = Supplier Confirm Time supplier confirmation period 13-09-10 09:01 [+] = Receiver Signature Receipt Person signature _______________ [129] + date Date ______________ [] + * * * END of PAGE * * *)
More cells from 126 to 130. In this case Array_combine will report warning error, Both parameters should has an equal number of elements.
If you want to match exactly, how do you filter the content information for unit 126-130?
Reply to discussion (solution)
The Array_combine function needs to participate in the operation of the two arrays of the same length, if you cannot guarantee this, do not use
Your 126-130 unit content is not in the two-dimensional table, of course, it needs to be handled separately
You might be able to
[Information] = = part
As the beginning of a two-dimensional table
[126] = Supplier
As the end of a two-dimensional table
You might be able to
[Information] = = part
As the beginning of a two-dimensional table
[126] = Supplier
As the end of a two-dimensional table
Can you write down an example? is the key value must be specified? Or as long as the result of the value is possible?
It's up to you to decide what to do.
I'm using array_combine just to tell you that you can do it.
It's up to you to decide what to do.
I'm using array_combine just to tell you that you can do it.
I mean, specify the starting and ending positions. Do you depend on the value of the array or the same key value?
It's up to you to decide what to do.
I'm using array_combine just to tell you that you can do it.
It's done. Since the last five elements are fixed, the Array_slice function is used, and a array_diff function is used to remove the following 5 rows of data. Thank you so much!