php的foreach 同时遍历两个数组并输出
已知数组$a=array("h1","h2","h3");$b=array("c1","c2","c3");用php的foreach的遍历方法输出h1c1h2c2h3c3...
已知数组
$a=array("h1","h2","h3");
$b=array("c1","c2","c3");
用php的foreach的遍历方法
输出
h1 c1
h2 c2
h3 c3 展开
$a=array("h1","h2","h3");
$b=array("c1","c2","c3");
用php的foreach的遍历方法
输出
h1 c1
h2 c2
h3 c3 展开
4个回答
展开全部
<?php
$a = ;
$b= ;
foreach($a as $k=>$va){
echo $va.$b[$k];
}
?>
手打,望采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
出队 array_shift
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
引用Risjazz的回答:
$a=array("h1","h2","h3");$b=array("c1","c2","c3");
for($a as $key => $value)
{
echo $value . $b[$key];
}
希望能够帮到你
$a=array("h1","h2","h3");$b=array("c1","c2","c3");for($a as $key => $value){ echo $value . $b[$key];}
$a=array("h1","h2","h3");$b=array("c1","c2","c3");
for($a as $key => $value)
{
echo $value . $b[$key];
}
希望能够帮到你
$a=array("h1","h2","h3");$b=array("c1","c2","c3");for($a as $key => $value){ echo $value . $b[$key];}
展开全部
$a=array("h1","h2","h3");$b=array("c1","c2","c3"); foreach($a as $key => $value){ echo $value . $b[$key];}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询