如何组合相同 pr 值的文本值?
Array (
[0] => Array ( [ID] => 1 [text] => text1 [pr] => project1)
[1] => Array ( [ID] => 2 [text] => text2 [pr] => project1)
[2] => Array ( [ID] => 2 [text] => text3 [pr] => project2)
[3] => Array ( [ID] => 2 [text] => text4 [pr] => project2)
[4] => Array ( [ID] => 2 [text] => text5 [pr] => project1)
)
输出:
$newarray = array(
"project1" => "text1 | text2 | text5",
"project2" => "text3 | text4",
);