|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13772 can't access element[0] af an array
Submitted: 2001-10-20 04:22 UTC Modified: 2001-10-20 04:45 UTC
From: gianpaolo at preciso dot net Assigned:
Status: Not a bug Package: Arrays related
PHP Version: 4.0.6 OS: debian gnu/linux 2.2
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.
Block user comment
Status: Assign to:
Bug Type:
From: gianpaolo at preciso dot net
New email:
PHP Version: OS:


 [2001-10-20 04:22 UTC] gianpaolo at preciso dot net
I have an array 
wich print_r function give me back so in this way:

    [0] => ~*

so I have one element. I have a function

  $value = $this->sbx[mch][$i];
  return ($value);

that returns back only values from the second one ( [1], [2] ecc.)
I had to solve this way
function give_string($i){
 if ($i == 0 ){
      $t = each ($this->sbx[mch]);
      $value = $t["value"];
    else {
      $value = $this->sbx[mch][$i];

Anyone met this problem?
Thanks and goodbye!


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-10-20 04:45 UTC]
Accessing the first element works just fine. Try asking on the mailinglist for support.

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Sep 24 01:03:38 2021 UTC