note 10116 added to Incrementing/Decrementing Operators

From: Date: Thu, 14 Dec 2000 10:15:40 +0000
Subject: note 10116 added to Incrementing/Decrementing Operators
Groups: php.notes 
Request: Send a blank email to php-notes+get-8724@lists.php.net to get a copy of this message
Regarding incrementing characters, this also works on strings. So, $a = 'z'; ++$a; // $a is now 'aa' ++$a; // $a is now 'ab' $a = 'az'; ++$a; // $a is now 'ba' However, you cannot decrement a string in this way. $a = 'az'; --$a; // $a is still 'az' http://www.php.net/manual/language.operators.increment.php

« previous php.notes (#8724) next »