我现在的代码 找不到 /n 字符
请问如何找到嗯?
扔上来的代码
立即学习“PHP免费学习笔记(深入)”;
<code>$xml = simplexml_load_file("ZH-CNstrings.xml");
// echo $xml->getName() . "<br />";
$cou = 1;
foreach($xml->children() as $child)
{ echo $child->getName();
if($child->getName() == "string-array"){
foreach ($child as $key2 => $value2) {
echo "<input type='text' name='".$value2["name"]."' value='".$value2."' style=' width: 500px; ' /><br>";
}
}else{
if (strstr($child,"color")
or strstr($child,"%1")
or strstr($child,"%s")
or strstr($child,"\n")
) {
echo "<b style='color: #f0f;'>有 特殊字符 </b>";
$cou++;
}
echo "<input type='text' name='".$child["name"]."' value='".$child."' style=' width: 500px; ' /><br>";
}
}</code>我现在的代码 找不到 /n 字符
请问如何找到嗯?
扔上来的代码
立即学习“PHP免费学习笔记(深入)”;
<code>$xml = simplexml_load_file("ZH-CNstrings.xml");
// echo $xml->getName() . "<br />";
$cou = 1;
foreach($xml->children() as $child)
{ echo $child->getName();
if($child->getName() == "string-array"){
foreach ($child as $key2 => $value2) {
echo "<input type='text' name='".$value2["name"]."' value='".$value2."' style=' width: 500px; ' /><br>";
}
}else{
if (strstr($child,"color")
or strstr($child,"%1")
or strstr($child,"%s")
or strstr($child,"\n")
) {
echo "<b style='color: #f0f;'>有 特殊字符 </b>";
$cou++;
}
echo "<input type='text' name='".$child["name"]."' value='".$child."' style=' width: 500px; ' /><br>";
}
}</code>
试试 \n
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号