[thelist] PHP Challenge

Aaron Wormus aaron at wormus.com
Fri Nov 25 12:52:02 CST 2005


Matt Warden wrote:
> Source:
> http://mwarden.f2o.org/sandbox/viewsource.php?linemode=0&f=interleaveStrings.php
>
> Example:
> interleaveStringsArray( array('FOO', 'evolt', '1234') );
>   

No need to use a regular expression to split the string, just access the 
characters of the string using curly brackets

|$sResult .= $b{$i};|

Not tested, but theoretically correct ;)
Aaron


>
> - --
> Matt Warden
> Miami University
> Oxford, OH, USA
> http://mattwarden.com
>
>
> This email proudly and graciously contributes to entropy.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD8DBQFDhW9frI3LObhzHRMRAi2MAJ9JQrCkz+UyGnk7el87hB8wG+xN4wCgzAW9
> YIRv4KG7jBSHQRFBRaMQIdQ=
> =GMx0
> -----END PGP SIGNATURE-----
>   




More information about the thelist mailing list