Advertisement
jiue123

syntax substr() PHP lay ky tu trong chuoi

Sep 29th, 2014
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.29 KB | None | 0 0
  1. <?php
  2. $rest = substr("abcdef", -1);    // returns "f"
  3. $rest = substr("abcdef", -2);    // returns "ef"
  4. $rest = substr("abcdef", -3, 1); // returns "d"
  5. ?>
  6.  
  7. Hàm substr() tìm ký tự tại vị trí mà ta chọn xem vd trên
  8. (syntax substr() found position word you want, you can see EX)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement