0

I have my $arr of key value pairs like this:

array(7) {
  ["No"]=>
  string(6) "101"
  ["Paper_id"]=>
  string(6) "WE3P-1"
  ["Title"]=>
  string(80) ""An Electrically-Small, 3-D Cube Antenna Fabricated with Additive Manufacturing""
  ["Author"]=>
  string(13) "NassarIbrahim"
  ["Auth_order"]=>
  string(9) "WE3P-1-01"
  ["Aff_list"]=>
  string(51) ""University of South Florida, Tampa, United States""
  ["Abstracts"]=>
  string(723) ""This paper presents the design of an electrically small""
}

array(4) {
  ["Author"]=>
  string(12) "WellerThomas"
  ["Auth_order"]=>
  string(9) "WE3P-1-02"
  ["Aff_list"]=>
  string(51) ""University of States""
  ["Abstracts"]=>
  string(2) "
"
}

array(7) {
  ["No"]=>
  string(3) "104"
  ["Paper_id"]=>
  string(6) "TU5A-3"
  ["Title"]=>
  string(40) "Signal-Interference Microstrip Duplexers"
  ["Author"]=>
  string(19) "Gomez-GarciaRoberto"
  ["Auth_order"]=>
  string(9) "TU5A-3-01"
  ["Aff_list"]=>
  string(48) ""University of  Spain""
  ["Abstracts"]=>
  string(535) ""Microwave planar duplexers shaped by signal-interference bandpass filters in their branches are presented."
"
}

array(4) {
  ["Author"]=>
  string(20) "Sanchez-RenedoManuel"
  ["Auth_order"]=>
  string(9) "TU5A-3-02"
  ["Aff_list"]=>
  string(48) ""University of Spain""
  ["Abstracts"]=>
  string(2) "
"
}

I want to join these arrays such that if their 'Auth_order' are sub-strings( like WE3P-1-101 and WE3P-1-02 ) then Author is concatenated to previous array and current array is unset.Eg:( If array that has WE3P-1-02 as Author_order then this array's 'Author' is concatenated with WE3P-1-01 'Author' and that array containing WE3P-1-02 is unset. Please help me out here guys?

I have tried some things using current($arr),prev($arr) ..but its not working!!

2
Contributors
1
Reply
3
Views
4 Years
Discussion Span
Last Post by diafol
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.