欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

数据合并问题,急,在线等

程序员文章站 2024-01-22 21:36:40
...
$str =array (0 => 'D14FE97964E040D37491' ,
1 => '8863B0E43C1793FF954B11D8EE1420B6' ,
2 => 'D2E7A0B60BB6703465AC320092595B2F' ,
3 => '785E9B35B5460BE82758E08E642216BD' ,
4 => 'B0E324E1DBCD97C62783E328053F31FE');
function csarray($str){
foreach ((array)$str as $value) {
$aaaa[] += $value."\n";
}
return $aaaa;
}


echo csarray($str);

怎样输出如下:

D14FE97964E040D37491
8863B0E43C1793FF954B11D8EE1420B6
D2E7A0B60BB6703465AC320092595B2F
785E9B35B5460BE82758E08E642216BD
B0E324E1DBCD97C62783E328053F31FE

回复讨论(解决方案)

$str =array (0 => 'D14FE97964E040D37491' ,      1 => '8863B0E43C1793FF954B11D8EE1420B6' ,      2 => 'D2E7A0B60BB6703465AC320092595B2F' ,       3 => '785E9B35B5460BE82758E08E642216BD' ,      4 => 'B0E324E1DBCD97C62783E328053F31FE');function csarray($str){foreach ((array)$str as $value) {    $aaaa.= $value."
"; } return $aaaa;}echo csarray($str);