jbonnett Posted October 24, 2012 Share Posted October 24, 2012 If I remove "=> $maxlength" there are no error $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 More sharing options...
Barand Posted October 24, 2012 Share Posted October 24, 2012 use >= => is something completely different Link to comment https://forums.phpfreaks.com/topic/269845-keep-getting-error-with-if-statement/#findComment-1387377 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.