note 93929 deleted from language.operators.precedence by degeberg

From: Date: Sat, 17 Apr 2010 15:15:53 +0000
Subject: note 93929 deleted from language.operators.precedence by degeberg
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-168347@lists.php.net to get a copy of this message
Note Submitter: Patryk Bratkowski ---- Please note that certain operators change the variable type in ways you may not expect. If you want to append the result of an arithmetic operation to a string you have to do it in two steps: <?php $ord = $i + 1; $field = "cellID" . $ord; // returns a string $field = "cellID" . $i + 1; // because of the addition it returns an int ?>

« previous php.notes (#168347) next »