Link to home
Start Free TrialLog in
Avatar of lilyyan
lilyyan

asked on

explode generating an empty element in an array

Hello,
I'm using explode to delimit a string, for example:

$testString="apple+";
//$testString = apple+orange";
$testStringArr = explode("+", $keywords);

The output of the size of the $testStringArr  both are 2.

Any suggestion is highly appreciated,
lilyyan




ASKER CERTIFIED SOLUTION
Avatar of glcummins
glcummins
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lilyyan
lilyyan

ASKER

well, if i use $testString="apple+"; the twp elemens are "apple" and "". (one empty string)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial