如何使用类似strpos的方法来检查数据
data->url = www.youtube.come/12345
@if($data->url != 'youtube' )
@endif
updated how can i put this in my balde temp
preg_match("#(?<=v=)[a-zA-Z0-9-]+(?=&)|(?<=v\/)[^&\n]+(?=\?)|(?<=v=)[^&\n]+|(?<=youtu.be/)[^&\n]+|(?<=/videos/)[^&^/\n]+#", $line['YOUTUBE'], $matches);
$videoId = $matches[0];
if(substr_count($line['YOUTUBE'], "facebook.com") > 0){
print "<div class=\"fb-video\" data-href=\"{$line['YOUTUBE']}\" data-allowfullscreen=\"true\" data-width=\"600\"></div>";
}else{
print "<iframe width=\"600\" height=\"350\" frameborder=\"0\" src=\"https://www.youtube.com/embed/{$videoId}?autoplay=1\"></iframe>";
}