Re: PHP 4.0 Bug #3281: Array handling returns "Array" or does something stupid when keys are strings
| From: | Sterling Hughes | Date: | Sat, 22 Jan 2000 21:08:31 +0000 |
| Subject: | Re: PHP 4.0 Bug #3281: Array handling returns "Array" or does something stupid when keys are strings | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-14842@lists.php.net to get a copy of this message | ||
Your code should not work, do the following:
$a[b]['a c'] = "lala";
echo "{$a[b]['a c']}";
As for the second example, duh!, so you call the array_keys function, you
need to do something with it:
$z['hello baby'] = "yo";
$z['bubye baby'] = "bah";
array_keys($z);
print implode("\0",$z);
Should print out the keys of the array.
Sterling Hughes
sterling@designmultimedia.com
: <?php
: $a[b]['a c'] = "lala";
: echo "$a[b]['a c']";
: ?>
:
: returns "Array"
:
: <?php
: $z['hello baby'] = "yo";
: $z['bubye baby'] = "bah";
: array_keys($z);
: ?>
:
: doesnt even return anything.
:
: I'm trying to write a script that parses out a mail header into
$message[header][headername] = "value";
: and headername might be a few words or might have some weird chars in it
and php's buggy arrays are causing me grief - lots of grief. It wouldnt
even matter if i removed all weird characters.
:
:
: --
: PHP Development Mailing List <http://www.php.net/>
: To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net
: For additional commands, e-mail: php-dev-help@lists.php.net
: To contact the list administrators, e-mail: php-list-admin@lists.php.net
: