Home > Backend Development > PHP Tutorial > 关于PHP数组的有关问题

关于PHP数组的有关问题

WBOY
Release: 2016-06-13 11:48:07
Original
851 people have browsed it

关于PHP数组的问题
数组:
 111:222
 333:444
 555:666

如何利用PHP重组为以下

  • 111:222
  • 333:444
  • 555:666


  • 请高手函数该怎么写帮忙写一下 谢谢。
    ------解决方案--------------------
    请把数组原型给输出来看看... 遍历数组拼装. 
    ------解决方案--------------------
    这不是数组而是字符串
    $yx = ' 111:222</br><br /> 333:444</br><br /> 555:666</br>';<br />echo preg_replace(array('/br/', '/ /'), array('li', '<li>'), $yx);<br />
    Copy after login
  • 111:222

  • 333:444

  • 555:666

  • Related labels:
    source:php.cn
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template