|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
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: Sat Oct 16 02:03:34 2021 UTC