Home > Backend Development > PHP Tutorial > 显示数据 - php数组输出显示的问题

显示数据 - php数组输出显示的问题

WBOY
Release: 2016-06-06 20:19:45
Original
1401 people have browsed it

这是被分为两个组的数据,键值【0】和【1】里面分别又有3个数据
现在想分开显示
第一组:(键值为0的)2IT14035A, 5IE14032S,1IE15003B,1IE15010C
第二组:(键值为1的)1IE14210D,1IE15001A, 1IT15001G,1IT14033S
该怎么办呢
谢谢大家

回复内容:

这是被分为两个组的数据,键值【0】和【1】里面分别又有3个数据
现在想分开显示
第一组:(键值为0的)2IT14035A, 5IE14032S,1IE15003B,1IE15010C
第二组:(键值为1的)1IE14210D,1IE15001A, 1IT15001G,1IT14033S
该怎么办呢
谢谢大家

分开指的具体是什么意思?怎么个分开法

<code class="php">$a = array(
array('2IT14035A','5IE14032S','1IE15003B','1IE15010C'),
array('1IE14210D','1IE15001A','1IT15001G','1IT14033S'));
echo "<table>";
foreach($a as $b){
echo "<tr>";
foreach($b as $c){
echo "<td>$c</td>";
}
echo "</tr>";
}
echo "</table>";</code>
Copy after login
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