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? Quote 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 Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.