0

I am looping through a key,value array with multiple data types possible in the value and I need to convent it to a query string on a URL. This section is trying to take a key like "name:in" and an array like ("one","two","three") and come up with a string like 'name:in=("one","two","three")'

if((gettype($val) == 'array') {
     $retStr .= $key . '=("' . implode('","',$val) . '")'              
}
elseif...

and I'm getting this error:

PHP Parse error: syntax error, unexpected 'elseif' (T_ELSEIF) in C:\Users\JAMESB\Documents\webroot\BC\swamp\1.php on line 52

I've tried different combinations of apostrophes and quotes escaped and unescaped and I'm getting nowhere.

Thanks,

JimB

Jimbus
  • 47
  • 8

0 Answers0