On Sat, 9 Oct 2004 15:06:36 +0200, "Stijn Goris" <me*****@hotmail.com> wrote:
$ttt = array();
$ttt = explode("-", "test-niet");
echo "$ttt[0] | $ttt[1]<br>";
Should give
test | niet
but gives
test-niet |
Which meens the string is cut into 2 pieces. Someone knows what i m doing
wrong?
As Daniel Tryba points out, the code you posted gives the _expected_ output
you posted, not the output you said it gives.
So, it's either a particularly silly bug in your version of PHP (which are you
using?) or we're not seeing the actual problem here.
Here's a completely wild guess - the data where this actually happens has come
from someone who's been using Microsoft Word, and instead of there being a '-'
dash character, Word's replaced it with an em-dash, which is a different
character.
--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool