Now this looks like what I would want...
brandon
- Original Message -
From: Philip Hallstrom [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, November 20, 2001 2:22 PM
Subject: [PHP] Re: Re: How do I convert from perl to php?
You could do something like
What about this?
$required = array('name','address','phone');
while ( list($key, $value) = each ($required) ) {
if ( empty($value) ) {
print(Sorry, you left $key empty.);
}
}
- Original Message -
From: Philip Hallstrom [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent:
Here is the php version
$required = array('name','address','phone');
Here is the perl version
@required = qw( name address phone );
So is there an easy way in perl for us lazy people so i dont have to use
commas and enter every variable name in single quotes?
--
PHP General Mailing List
The point of keeping it easier is what if i want to give my script to a
friend, do you REALLY want to explain to a non-programmer how to add another
if statement or condition when they could simply add the field to the array?
And actually you only have to change the name in 2 places.
1. you
Why are you even using frontpage themes? If you know how to program PHP you
should be above using MS frontpage features... Frontpage is good for a
WYSIWYG editor, but I highly recommend NOT using its proprietary features...
use CSS or something...
Brandon L.
- Original Message -
From:
5 matches
Mail list logo