RE: [PHP] suffixSwap function
| From: | Samantha Savvakis | Date: | Fri, 06 Oct 2000 05:12:01 +0000 |
| Subject: | RE: [PHP] suffixSwap function | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-18836@lists.php.net to get a copy of this message | ||
> 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.