The Easiest Way to Save and Share Code Snippets on the web

substr simple 2

php

posted: May, 13th 2010 | jump to bottom

<?php
$rest = substr("aimadj", -1);    // النتيجة "j"
 
$rest = substr("abcdef", -2);    // النتيجة "ef"
 
$rest = substr("abcdef", -3, 1); // النتيجة "d"
?>
38 views