<?php $str = "fdsafdaf fdafsaf"; echo strpos($str," "); // the result is 8?>
strpos(string,find,start)The strpos() function returns the position of the first occurrence of a string inside another string.If the string is not found, this function returns FALSE. <?php if(strpos("Hello world!"," ")){ echo '有空格'; }else{ echo '没有空格'; } ?>
preg_match
国内超强ORM类
http://code.google.com/p/queryphp/downloads/list
<?php
$str = "fdsafdaf fdafsaf";
echo strpos($str," ");
// the result is 8?>
<?php
if(strpos("Hello world!"," ")){
echo '有空格';
}else{
echo '没有空格';
}
?>
strpos(chr(13, $s));
strpos(chr(13), $s);
//这里有空格.
}