Thanks for your help. At the beginning, i just feel that i have to use foreach. but i have no idea how to do that.
You help me out of this case.
But i still get the problem.
i make the script like this:
$arr = array();
// Read the data an get it into array $data
foreach($data as $v)
list($val,$key) = explode('#',$v);
$arr[$key] .= "$val|";
$arr[$key] = $val;
and the result is: 112|312|4|35|35|6|7
i just want, the result is: test:1|2|4|;test2:3|5|6|;test3:7|
So, i can explode the result to get the value of test, test2 and test3.
Can you help me?
And Pradeep, can you help me to teach about class and function? Where the article i can read and learn. I mean the simple one, that i can learn better.