<?php
function consultarValor($texto, $procurar){
$pos = strpos($texto , $procurar); if ($pos === false)
return false;
else
return true;
}
$texto = 'aqui fica o valor do texto do membro';
$procurar = 'membro';
if (consultarValor($texto, $procurar)){
echo "Encontrado!";
// Fazer algo aqui caso o valor de $procurar existe em $texto.
} else {
// $procurar não existe em $texto.
echo "Nada foi encontrado!";
}
PD9waHAKCmZ1bmN0aW9uIGNvbnN1bHRhclZhbG9yKCR0ZXh0bywgJHByb2N1cmFyKXsKCSRwb3MgPSBzdHJwb3MoJHRleHRvICwgJHByb2N1cmFyKTsKCWlmICgkcG9zID09PSBmYWxzZSkKCSAgcmV0dXJuIGZhbHNlOwoJZWxzZQoJICByZXR1cm4gdHJ1ZTsKfQoKJHRleHRvID0gJ2FxdWkgZmljYSBvIHZhbG9yIGRvIHRleHRvIGRvIG1lbWJybyc7CiRwcm9jdXJhciA9ICdtZW1icm8nOwoKaWYgKGNvbnN1bHRhclZhbG9yKCR0ZXh0bywgJHByb2N1cmFyKSl7CgllY2hvICJFbmNvbnRyYWRvISI7CgkvLyBGYXplciBhbGdvIGFxdWkgY2FzbyBvIHZhbG9yIGRlICRwcm9jdXJhciBleGlzdGUgZW0gJHRleHRvLgp9IGVsc2UgewoJLy8gJHByb2N1cmFyIG7Do28gZXhpc3RlIGVtICR0ZXh0by4KCWVjaG8gIk5hZGEgZm9pIGVuY29udHJhZG8hIjsKfQ==