2

I've always had problems with strpos, I understand the num v. boolean issue, but I can NOT get this working. The $cur_key value is something like "page=>name"...

$pos = strpos($cur_key, "=>");
if ($pos !== false) {
   $mod = explode("=>",$cur_key);
   $path = $mod[0];
   $param = $mod[1];                                
}else{
   $path = $cur_key;
}

If it's in there it should split it into the two values but no matter what I try it's always just returning the original value...

Fluidbyte
  • 5,162
  • 9
  • 47
  • 76

1 Answers1

0
$mod = explode('=>',$cur_key);
$path=$mod[0];
if (sizeof($mod)>1) $param=$mod[1]; else $param='';
Eugen Rieck
  • 64,175
  • 10
  • 70
  • 92