Comma separated list

From: Date: Sun, 26 Aug 2012 01:15:36 +0000
Subject: Comma separated list
Groups: php.db 
Request: Send a blank email to php-db+get-48431@lists.php.net to get a copy of this message
Hi all I've moved on to learning checking forms for valid imput and when doing thing that are repetive, like if ($_POST['first'] == "") { $errors .= 'Please enter a valid name.'; } if ($_POST['second'] == "") { $errors .= 'Please enter a valid name.'; } I can think of a slightly better way like if($_POST['first'] || $_POST['second'] || $_POST['third'] ==){ bla bla } I think I could also use empty(), not sure though, But I belive there are much easier ways. What would anyone here do? If it were me, I'd use the one that uses the or operator. David M.

« previous php.db (#48431) next »