php中关于数组问题如何从中提取我输出的值。 5
<?php$food=array("牛奶","蛋糕","牛啡","蛋干","蛋尼玛");foreach($foodas$a){printstrstr($a,"牛");}e...
<?php
$food=array("牛奶","蛋糕","牛啡","蛋干","蛋尼玛");
foreach($food as $a){
print strstr($a,"牛");
}
echo $a
?>
代码就是这样,但是我想要把我 echo $a 得到如输出的是牛奶,牛啡,那我想要他输出一个 2 给我怎么办? 展开
$food=array("牛奶","蛋糕","牛啡","蛋干","蛋尼玛");
foreach($food as $a){
print strstr($a,"牛");
}
echo $a
?>
代码就是这样,但是我想要把我 echo $a 得到如输出的是牛奶,牛啡,那我想要他输出一个 2 给我怎么办? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询