php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7585 Asigning variables to arrays
Submitted: 2000-11-02 05:18 UTC Modified: 2000-11-27 06:07 UTC
From: php at bitgeeks dot com Assigned:
Status: Closed Package: *General Issues
PHP Version: 4.0.2 OS: linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: php at bitgeeks dot com
New email:
PHP Version: OS:

 

 [2000-11-02 05:18 UTC] php at bitgeeks dot com
When trying to assign variables to arrays the dont apply.

Ie,

$StrJanuary = "januari";
$montharray[01] = $StrJanuary;

printf("DEBUG1: $StrJanuary<br>");
printf("DEBUG2: $montharray[01]<br>");
printf("DEBUG3: %s<br>", $montharray["01"]);

outputs...

DEBUG1: januari
DEBUG2: 
DEBUG3: 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-02 06:15 UTC] waldschrott@php.net
> printf("DEBUG2: $montharray[01]<br>");

this is a possible failure in auto-conversion....

> printf("DEBUG3: %s<br>", $montharray["01"]);

this one is allright, read the manual on "auto-conversion", it should read $montharray[01]


 [2000-11-03 16:36 UTC] joey@php.net
This would work if you would stop using octals as array keys:
$montharray[1]
 [2000-11-27 06:07 UTC] sniper@php.net
Not a bug. --> closed. 

--Jani
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 10:01:33 2025 UTC