Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hàm trim dùng xóa một số ký tự ta muốn
- VD1:
- $str = "Hello World!";
- echo trim($str,"Hed!");
- result: llo Worl
- VD2: nếu không có tham số thứ 2 hàm trim sẻ xóa một sô ký tự như (" ", \t, \n, \r, \0, \x0B).
- $text = "\t\tThese are a few words :) ... ";
- $trimmed = trim($text);
- result: These are a few words :) ...123
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement