2012-03-05 3 views

ответ

2

Заканчивать Документы для функции strstr
Или strpos
Или preg_match

+0

Помощь будет ве ry оценили. Я не могу понять, как это работает ... –

+0

'strpos (" blablab/wp-forum.php? Link "," blablab/wp-forum.php ")' – Julien

0

Вы можете использовать strpos, чтобы найти первое вхождение такой строки

 <?php 
     $pos = strpos($largerString,$fimdMe); 
     if($pos === false) { 
     // string $findMe not found in $largerString 
     } 
    else { 
     // found it 
    } 
    ?> 
1
$str = "blablab/wp-forum.php?link"; 
$find = "blablab/wp-forum.php"; 

$position = strpos($str, $find); 

if($position !== FALSE) // !== operator to check the type as well. As, strpos returns 0, if found in first position 
{ 
    echo "String contains searched string"; 
} 
Смежные вопросы