Thursday, 29 August 2013

PHP list() assign - trim before assign or any other function?

PHP list() assign - trim before assign or any other function?

I am using a list() assign in PHP so I could assign array values to more
variables at once.
Thing is I need to trim() the array inputs before - of course you could do
a foreach on array before or after that - but is there a way to cast trim
as a some kind of assignment filter - or at least trim the array inline
(no external function or foreach)?
The question is more like general - can you add some filter function to a
list() assigment?

No comments:

Post a Comment