时间:2021-07-01 10:21:17 帮助过:14人阅读
file:str-lengh.php url:http://localhost:88/str/str-lengh.php "; // for循环访问数组 //for($i=0; $i"; //} // while循环访问数组 $i=0; while($i "; $i++ } ?>
file:str-strip-tags.php url:http://localhost:88/str/str-strip-tags.php hello world!输出原始的字符串内容 echo "Original Text:"; echo $text."hello world!
hello world!
"; //
file:str-entities.php url:http://localhost:88/str/str-entities.php "; echo rawurlencode($text)."
"; ?>
file:str-wordwrap.php url:http://localhost:88/str/str-wordwrap.php "; echo $text."
"; echo $text."
"; echo "Destination text(after wrap):"."
"; echo wordwrap($text, 50, "
")."
"; ?>
file:str-strpos.php url:http://localhost:88/str/str-strpos.php
file:str-strreplace.php url:http://localhost:88/str/str-strreplace.php "; echo $text."
"; echo "
"; echo "Destination text(replace):"."
"; echo str_replace(" ", "__", $text)."
"; ?>
file:str-compare.php url:http://localhost:88/file/str-compare.php
file:str-sub.php url:http://localhost:88/file/str-sub.php '; echo 'Destination String: '.$newStr.'
'; ?>
file:str-count.php url:http://localhost:88/file/str-count.php
file:str-explode-implode.php url:http://localhost:88/str/str-explode-implode.php "; echo $text."
"; echo "
"; $sentenses = explode(". ", $text); echo "Destination text(explode):"."
"; foreach ($sentenses as $sentense){ echo $sentense."
"; } echo "
"; $newText= implode($sentenses, ". "); echo "Destination text(implode):"."
"; echo $newText."
"; ?>
file:str-trim.php url:http://localhost:88/str/str-trim.php "; echo strlen($text)."
"; echo "
"; echo "Destination text(trim):"."
"; echo strlen(trim($text))."
"; ?>
file:str-printf.php url:http://localhost:88/str/str-printf.php