Re: Is there a shorthand way to...?
| From: | Marek Kilimajer | Date: | Mon, 22 Nov 2004 14:25:57 +0000 |
| Subject: | Re: Is there a shorthand way to...? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-202674@lists.php.net to get a copy of this message | ||
Al wrote:
When handling $_POST[] values that may or may not be assigned, I am forever using: if((isset($_POST['courses_list']) AND $_POST['courses_list']== 'Used')) Is there a shorthand way of doing this without causing notice errors? Thanks.....Before your condition: $courses_list = isset($_POST['courses_list']) ? $_POST['courses_list'] : ''; then: if($courses_list == 'Used')) Sure, does not help any for a single condition.