//遍历select搜索结果,只取数字标key值,防止重复 foreach ($row as $key => $value) { if (is_int($key)) { echo $value; echo " | "; } }