Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

str_increment

Description

Increment an alphanumeric string

Syntax

str_increment(
    string $string
): string

Parameters

string

The input string.

Return

Returns the incremented alphanumeric ASCII string.

Examples

1

<?

$string = 'a';

$return = str_increment($string);

echo $return;

?>
b

2

<?

$string = 'z';

$return = str_increment($string);

echo $return;

?>
aa

3

<?

$string = 'az';

$return = str_increment($string);

echo $return;

?>
ba

4

<?

$string = '0';

$return = str_increment($string);

echo $return;

?>
1

5

<?

$string = '9';

$return = str_increment($string);

echo $return;

?>
10
HomeMenu