Closed. This question is not reproducible or was caused by typos。它当前不接受答案。
想改善这个问题吗?更新问题,以便将其作为on-topic用于堆栈溢出。
5年前关闭。
Improve this question
我是php新手。从教程中得到了这一点;由于某种原因,它向我发送错误
想改善这个问题吗?更新问题,以便将其作为on-topic用于堆栈溢出。
5年前关闭。
Improve this question
我是php新手。从教程中得到了这一点;由于某种原因,它向我发送错误
$fields_with_lengths = array('menu' => 30);
foreach ($fields_with_lengths as $fieldname => $maxlength){
if(strlen(trim($_POST[$fieldname])) => $maxlength){
}
}
最佳答案
条件应如下所示-=>
仅用于关联数组中的键和值
if(strlen(trim($_POST[$fieldname])) >= $maxlength){
09-20 23:51