marz Posted May 7, 2005 Report Share Posted May 7, 2005 kaut kur redzeeju jau par to rakstam bet nevaru atcereeties. Taatad ideja taada, ka noposto vaardu, piem, 'pel' un paarmeklee tekstu, vai tajaa atrodas shaads vaards(vaarda dalja). Kartu'pel'is iet un aiziet. Vopsh sameklee vai tajaa tekstaa atrodas 'pel'. Link to comment Share on other sites More sharing options...
Lynx Posted May 7, 2005 Report Share Posted May 7, 2005 Viens no veidiem: <?PHP $teksts = 'asddftasdpeletc'; if(preg_match('/pel/', $teksts)) { echo 'pel tika atrasts'; } ?> Link to comment Share on other sites More sharing options...
Venom Posted May 7, 2005 Report Share Posted May 7, 2005 ja preg_match, tad vismas /pel/i, citādi pietiek ar strpos($text,'pel')!==false vai pat strpos(strtolower($text),'pel')!==false Link to comment Share on other sites More sharing options...
Recommended Posts