Jump to content

Keep Getting Error With If Statement


jbonnett

Recommended Posts

If I remove "=> $maxlength" there are no error :shrug:

$fields_with_lengths = array("menu" => 30);
foreach($fields_with_lengths as $fieldname => $maxlength){
if(strlen(trim(mysql_prep($_POST[$fieldname]))) => $maxlength){
$errors[] = $fieldname;
}
}

The "mysql_prep()" is a custom function.

 

Hoping someone can help me?

Link to comment
https://forums.phpfreaks.com/topic/269845-keep-getting-error-with-if-statement/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.