Data type issues
| From: | Peter Hutnick | Date: | Tue, 14 Jan 2003 15:49:24 +0000 |
| Subject: | Data type issues | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-131570@lists.php.net to get a copy of this message | ||
I can't get my head around dealing with all the magic that PHP does to my
data. I'm trying to do the following (in C++):
char a = 'a';
a = a + 13;
The resulting value of a is 'n'. If I do the equivalent in PHP ($a = "a";
$a += 13;) the resulting value is 13. I tried (int)$a += 13;, but that
doesn't make a difference.
Is there some "whole different way of thinking" I should be engaged in?
Is there some way to make PHP add an int to the ASCII value of a single
character string (since there seems to be no char type)?
Thanks,
Peter