<!DOCTYPE html><html><body><?php$str = "Hello World!";echo $str "<br>". ;echo trim($str,"Herld!");?></body></html>
Hasil keluarannya ialah:
Hello World!o Woo
o Wo
Kerana ll telah dibersihkan oleh fungsi trim
Kerana ll telah dibersihkan oleh fungsi trim