[pmwiki-devel] strange strpos problem...

The Editor editor at fast.st
Tue Apr 24 12:24:27 CDT 2007


I've been struggling with some complicated variable functions and have
my head wrapped around a strange problem...

Given this function:

function ZAPMfunc($params) {
  if (strpos($params, " ") !== false) {
      return "yes";
      }
   else {
      return "nope";
      }
...

I've verified that $params is a string (using gettype) and that it's
value has a space in the middle of it. I can return $params and it's
exactly what it's supposed to be.

Yet this function no matter what returns "nope" instead of "yes".

I also tried

function ZAPMfunc($params) {
   return substr($params, 1,2);

for example and it comes up blank.

Something very strange here, or perhaps something so obvious I'm missing it.

Cheers,
Dan



More information about the pmwiki-devel mailing list