Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

get last characters of string in php

<?php
	echo substr('Telangana', -3); // ana
	print "<br/>";
	echo substr('Telangana', -1, 1); // a
	print "<br/>";
	echo substr('Telangana', 0, -1); // Telangan
?>
Source by onecompiler.com #
 
PREVIOUS NEXT
Tagged: #characters #string #php
ADD COMMENT
Topic
Name
8+3 =