Explode string into array with no empty elements?
array_filter will remove the blank fields, here is an example without the filter:
print_r(explode('/', '1/2//3/'))
prints:
Array( [0] => 1 [1] => 2 [2] => [3] => 3 [4] =>)
With the filter:
php> print_r(array_filter(explode('/', '1/2//3/')))
Prints:
Array( [0] => 1 [1] => 2 [3] => 3)
You'll get all values that resolve to "false" filtered out.