RE: [PHP] suffixSwap function

From: Date: Wed, 11 Oct 2000 16:48:02 +0000
Subject: RE: [PHP] suffixSwap function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-19628@lists.php.net to get a copy of this message
On Fri, 6 Oct 2000, Samantha Savvakis wrote: > > The reason the split() wasn't behaving as you expected was that split was > > receiving only a . as its pattern, not a '.' as you wanted it to. To > > split() using a literal '.' as a pattern, you would've needed to say > > $pattern = "'.'" or something along those lines. > > > > I've tried split on my machine and it doesn't give the desired result. > > my line was: > > $array = split($filename, "."); > I received the same output as Theodore. > > strtok works for me. Your parameters are backwards ;) http://www.php.net/manual/function.split.php Matt

« previous php.general (#19628) next »