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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 01 02:01:32 2024 UTC