$row = mysql_fetch_array($sql);
statusColor($row['status']);
function statusColor($x) {
if (stripos($x, '2nd') == true) {
echo "Best";
}
}
注意:用于提取的数据将返回'2nd Shift'或'3rd Shift'。PHP函数无法返回值
上面的代码不返回任何内容。只是空白。赞赏如果你能帮我解决问题。
我在PHP 5.3.28上运行。