RE: [PHP] Conversion number two?

2001-11-20 Thread Johnson, Kirk

> 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?

Not that I know of. Of course, one can't be all that lazy if one has learned
perl ;)

Kirk

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Conversion number two?

2001-11-20 Thread Philip Olson

perhaps you want to do the following:

 function foo($str) {
   return explode(' ',$str);
 }

 $required = foo('name address phone');

regards,
Philip Olson

On Tue, 20 Nov 2001, Brandon Lamb wrote:

> 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 (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Conversion number two?

2001-11-20 Thread Steve Werby

"Brandon Lamb" <[EMAIL PROTECTED]> wrote:
> 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?

I think you mean PHP not perl, but there is a way.

$required = explode( ' ', 'name address phone' );

The code above turns the space separated list into an array.

-- 
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Conversion number two?

2001-11-20 Thread Brandon Lamb

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 (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]