Counting comma seperated values in php,how to?
- by Jay
Hey folks,
I have a variable holding values separated by a comma (Implode), I'm trying to get the total count of the values in that variable however, count() is just returning 1.
I've tried converting the comma separated values to a properly formatted array which still spits out1.
So heres the quick snippet where the sarray session equals to value1,value2,value3:
$schools = $_SESSION['sarray'];
$result = count($schools);
Any help would be appreciated.