". "
";echo trim($str,"Herld!");?><"> About trim function-PHP Chinese Network Q&A
About trim function
益伦
益伦 2017-11-22 22:36:00
0
2
1295




$str = "Hello World!";
echo $str . "
". "
";
echo trim($str,"Herld!");
?>

The output result is:

Hello World!

o Wo

Shouldn’t the second line be: llo Wo?

益伦
益伦

reply all (1)
小崔

Because ll was cleared by the trim function

  • reply Thank you!
    益伦 author 2017-11-23 21:33:04
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!