This is a discussion on does function extract() trim? within the PHP General forums, part of the PHP Programming Forums category; do not laugh, but I "discovered" today function extract(); :D before I used: foreach ($array as $key => $...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
do not laugh, but I "discovered" today function
extract(); :D before I used: foreach ($array as $key => $value) { ${$key} = trim($value); } though, "trimming" $value is kind of important to me and I would like to know if extract "trims" too? thanks. -ll __________________________________________________ __________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs |
|
|||
|
On 28 Mar 2008, at 20:59, Lamp Lists wrote:
> do not laugh, but I "discovered" today function > extract(); :D > > before I used: > foreach ($array as $key => $value) > { > ${$key} = trim($value); > } > > though, "trimming" $value is kind of important to me > and I would like to know if extract "trims" too? No, but you can use http://php.net/array_map to do the trim before using extract. -Stut -- http://stut.net/ |