The substr() function returns a part of a string.
<?php
echo substr("abcde", -1); => e
echo substr("abcde", -2); => de
echo substr("abcd", -3, 1); => b echo substr("abcdef", 0, -1); => abcde echo substr("abcdef", 2, -1); => cde echo substr("abcdef", -4, -2); => cd
?>
沒有留言:
張貼留言