Welcome Guest, Not a member yet? Register   Sign In
PHP strpos
#5

[eluser]frist44[/eluser]
Yeah, you're right. I don't know why I didn't think of that. I ended up with this solution:

Code:
if (!is_array_in_string($this->_non_record_url, cur_url())){
           $this->set_prev_url();
       }

with this helper:

Code:
function is_array_in_string($xArr, $xStr) {        
        if (!is_array($xArr)) $xArr[] = $xArr;        
        foreach ($xArr as $el) if (strpos($xStr, $el) !== FALSE) return TRUE;
        return FALSE;
    }


Messages In This Thread
PHP strpos - by El Forum - 01-01-2010, 12:06 PM
PHP strpos - by El Forum - 01-01-2010, 01:15 PM
PHP strpos - by El Forum - 01-01-2010, 01:22 PM
PHP strpos - by El Forum - 01-01-2010, 01:33 PM
PHP strpos - by El Forum - 01-01-2010, 01:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB