我的结果是var_dump
$arr = explode("\n", $str);
var_dump($arr);
array(1) {
[0]=>
string(16) "Ìäíå ãÕÑí (EGP) "
}
array(1) {
[0]=>
string(72) " 0.5358 1 Ìäíå ãÕÑí = 0.5358 ÑíÇá ÓÚæÏí 1 ÑíÇá ÓÚæÏí = 1.8664 Ìäíå ãÕÑí "
}
array(1) {
[0]=>
string(72) " 0.5353 1 Ìäíå ãÕÑí = 0.5353 ÑíÇá ÓÚæÏí 1 ÑíÇá ÓÚæÏí = 1.8682 Ìäíå ãÕÑí "
}
array(1) {
[0]=>
string(8) " 0.09 % "
}
我需要在另一个数组中获取每个值
$ arr [0] =“ÌäíåãÕÑí(EGP)”;
$ arr [1] =“0.53581ÌäíåãÕíí=0.5358ÑíÇáÓÚæÏí1ÑíÇáÓÚæÏí=1.8664ÌäíåãÕÑí”;
$ arr [2] =“0.53531ÌäíåãÕíí=0.5353ÑíÇáÓÚæÏí1ÑíÇáÓÚæÏí=1.8682ÌäíåãÕÑí”;
$ arr [3] =“0.09%”;
答案 0 :(得分:0)
将$ arr传递给另一个数组变量
$foo = array();
$foo = $arr;