我有这个数组:
$auflistung = array ($_POST['jacken'], $_POST['hosen'], $_POST['oberteil'], $_POST['tasche'], $_POST['schuhe'], $_POST['accessoireschmuck1'], $_POST['accessoireschmuck2'], $_POST['accessoireschmuck3'], $_POST['accessoireschmuck4'], $_POST['accessoireschmuck5'], $_POST['accessoireschmuck6']);
它包含例如:
array(11) {
[0]=> string(10) "1288023365"
[1]=> string(10) "1246154493"
[2]=> string(0) ""
[3]=> string(10) "1293143681"
[4]=> string(10) "1293143242"
[5]=> string(0) ""
[6]=> string(0) ""
[7]=> string(0) ""
[8]=> string(0) ""
[9]=> string(0) ""
[10]=> string(0) ""
}
现在我需要可用值的数量。在这种情况下 4
我试过:回声计数($auflistung);但结果包括所有空值,所以 11. 有什么想法吗?