Similar to how you get the last character in a string using Javascript, you just slice off the last N characters.
$last_character = substr( $somestring, -1 ); $last_two_characters = substr( $somestring, -2 );
Similar to how you get the last character in a string using Javascript, you just slice off the last N characters.
$last_character = substr( $somestring, -1 ); $last_two_characters = substr( $somestring, -2 );
Thank you for sharing.