[SOLVED] Explode ... not exploding

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Steveo31
Forum Contributor
Posts: 416
Joined: Sun Nov 23, 2003 9:05 pm
Location: San Jose CA

[SOLVED] Explode ... not exploding

Post by Steveo31 »

Really weird. I've used this function a million times and for some reason (I think I'm just numb to this project by now) it's not doing what I ask, or rather think I'm asking.

Code: Select all

//the URL looks like ...&searchterm=a+b+c
$terms = explode("+", $_GET['searchterm']);
print_r($terms);
By this, it should come back with

Code: Select all

Array (ї0] => a, ї1] => b, ї2] => c)
Or something to that effect, right?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

$_GET['searchterm'] will be 'a b c' there is no plus sign in it once url decoded..
Steveo31
Forum Contributor
Posts: 416
Joined: Sun Nov 23, 2003 9:05 pm
Location: San Jose CA

Post by Steveo31 »

Awesome. Thanks feyd.
Post Reply