Re: For my understanding
Aziz Saleh <[email protected]> Sat, 25 Jul 2015 21:47:23 -0400
| Newsgroups | gmane.comp.php.database |
|---|---|
| Message-ID | <CAPJtNhXHQ+QhtXWge3iR9E=Dj_6PGgdSaCM6Tz2we0VUrN2ufQ@mail.gmail.com> |
On Sat, Jul 25, 2015 at 9:33 PM, Karl DeSaulniers <[email protected]> wrote: > Hello, > This might be a question better suited for the general php list. > If it is, please let me know. > > I have inherited some pages that have a code on it I don't recognize. > Can anyone enlighten me as to what this code is doing? > > [code] > array_walk($Options, create_function('&$val', '$val = trim($val);')); > > Is this creating php variables from the contents of the $Options array? > TIA > > Best, > > Karl DeSaulniers > Design Drumm > http://designdrumm.com > > > > It's trimming all elements within the array. http://php.net/manual/en/function.array-walk.php http://php.net/manual/en/function.create-function.php http://php.net/manual/en/function.trim.php