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
Post a Comment