16-07-2007, 22:00
|
|
|
חבר מתאריך: 17.05.05
הודעות: 7,321
|
|
1.
בשביל מה הביטוים הרגולרים?
קוד PHP:
$str = 'I am looking for google, did you see him?';
if (!strstr($str,'google'))
echo 'I didn\'t find google!';
# else, i found him
2.
קוד PHP:
$str = 'I am looking for google, did you see him?';
if (!strstr($str,'google') && preg_match('[\w]{6}', $str))
echo 'There is a match!';
|