Bug #10506 Updated: Using a variable as a mathematical operator
| From: | cynic@php.net | Date: | Thu, 26 Apr 2001 09:14:35 +0000 |
| Subject: | Bug #10506 Updated: Using a variable as a mathematical operator | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-52478@lists.php.net to get a copy of this message | ||
ID: 10506
Updated by: cynic
Reported By: jdj@darkside.dynup.net
Old-Status: Open
Status: Bogus
Bug Type: Feature/Change Request
PHP Version: 4.0.4pl1
Assigned To:
Comments:
just not correct.
Previous Comments:
---------------------------------------------------------------------------
[2001-04-26 05:06:01] jdj@darkside.dynup.net
I am parsing the Date: header of an email address, which includes a GMT offset in the form [+|-]%4d.
Ideally, one of the following would work. ;)
$hour_mins = '0600';
$gmt_offset = '+0200';
$hour_mins = $hour_mins $gmt_offset[0] substr ($gmt_offset, 1);
That returns a parse error.. as does the short form of that (+=).
As it is now, I'm switch()'ing the $gmt_offset[0].
$hour_mins += substr ($gmt_offset, 1); works..
$hour_mins = $hour_mins + substr ($gmt_offset, 1); works..
Is this unsupported for any particular reason.. or am I just not syntactically correct?
Thanks!
Jeremy
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10506&edit=2