php - Warning: strpos() [function.strpos]: Empty delimiter in foreach statement -


i have read topics regarding strpos() issues cant find 1 fix mine. here code.

foreach($titles_array $k=>$v) { if(strpos($subject,$v) !== false) {         $i++;     $asd[$titles['id']] = $i;    } } 

the script works , results i'm looking error comes : warning: strpos() [function.strpos]: empty delimiter

i read might empty string or value in array i've checked them both , didnt found empty string/value. appreciate help. best !

the "empty delimiter" warning occurs when second parameter strpos empty. have empty value in $titles_array.

i have reproduced warning here: http://3v4l.org/rnu3q

try print_r($titles_array) right before foreach loop.


Comments

Popular posts from this blog

asp.net mvc 3 - Using mvc3, I need to add a username/password to the sql connection string at runtime -

kineticjs - draw multiple lines and delete individual line -

thumbnails - jQuery image rotate on hover -