Warning: count(): Parameter must be an array or an object that implements Countable
$tags=locchuoi($request,"<span class='SeoH1'>",'</span>'); for($ll=1;$ll<count($tags)+1;$ll++) { $tag_link = $tag_link.$tags[$ll].","; }
Advertisement
Answer
$tags=locchuoi($request,"<span class='SeoH1'>",'</span>'); for($ll=1;$ll<(!empty($tags) ? count($tags)+1 : 0);$ll++) { $tag_link = $tag_link.$tags[$ll].","; }
Try this code, I just add some condition inside the for() , when the $tags varible is empty return 0 , if not return count($tags)+1 .