$str = "fdsa fsaff fsdafdsa";
function isspace($str)
{
if(preg_match("/[ ]+/",$str))
{
return true;
}
else
{
return false;
}
}
if(isspace($str))
{
echo "good";
}
else
{
echo "bad";
}如果是空格的问题那就去掉呗
function repace_space($str)
{
$str = preg_replace(' ','',$str);
Return $str;
}
function isspace($str)
{
if(preg_match("/[ ]+/",$str))
{
return true;
}
else
{
return false;
}
}
if(isspace($str))
{
echo "good";
}
else
{
echo "bad";
}如果是空格的问题那就去掉呗
function repace_space($str)
{
$str = preg_replace(' ','',$str);
Return $str;
}
if(strstr($aaa," "))
echo "有空格";
else
echo "无空格";问题2
dd="<?echo $e[0];?>";
parent.a.document.writeln("<a href=javascript:parent.b.onlines(dd)><?echo $e[0];?></a>");
<script language="javascript">
dd="<?echo $e[0];?>";
parent.a.document.writeln("<a href=\"javascript:parent.b.onlines('"+dd+"')\"><?echo $e[0];?></a>");
//onlines()是一个函数,有一个字符型的参数。
</script>