字节数组到PHP中的字符串转换 [英] byte array to string conversion in php
本文介绍了字节数组到PHP中的字符串转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道如何将字节数组转换为php代码中的字符串吗?有人可以帮我吗?
预先感谢!
$ arr ="[B @ 187aeca";
echo implode(",$ arr);
?>
我试过了,但是对我没用.
[/Edit]
Hi,
I want to know how to convert byte array to a string in php code ? Can anyone help me out ?
Thanks in advance !
$arr="[B@187aeca";
echo implode(" ",$arr);
?>
I tried this but it didn''t work for me.
[/Edit]
推荐答案
arr ="[B @ 187aeca";
echo implode(",
arr="[B@187aeca";
echo implode(" ",
arr);
?>
我试过了,但是对我没用.
[/Edit]
arr);
?>
I tried this but it didn''t work for me.
[/Edit]
您是否尝试过implode
?我只将它与字符串sofer数组一起使用,但是您可以尝试一下,看看它是否对您有用.
Have you triedimplode
yet? I have only used it with arrays of strings sofar, but you can try it out to see if it works for you.
<?php
这篇关于字节数组到PHP中的字符串转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文