Lee [1] => Zhao [2]"/> Lee [1] => Zhao [2]">

Home >Backend Development >PHP Tutorial > PHP中输出换行怎么实现

PHP中输出换行怎么实现

WBOY
WBOYOriginal
2016-06-13 13:29:58967browse

PHP中输出换行如何实现
比如
$name = array("Lee", "Zhao", "Zhang");
我想第一排输出所有元素
print_r($name);
第二排输出指定元素
echo name[1];

输出的结果应该为
Array ( [0] => Lee [1] => Zhao [2] => Zhang )
Zhao

本人新手,望大牛解惑

------解决方案--------------------

PHP code

$name = array("Lee", "Zhao", "Zhang");
print_r($name);
echo '<br>';
echo $name[1]; <div class="clear">
                 
              
              
        
            </div>
Statement:
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