这是我尝试过的
$a = array("a", "b", "c");
$b = $a[0];
if (array_search($b,$a) == 0) {
echo $a[0]." and some code";
}
else {
foreach($a as $c) {
echo $c."and some different code";
}
}
我希望结果是
a and some code
b and some different code
c and some different code etc...
慕斯王
繁星点点滴滴
Qyouu