Re: Multidimensional Array manipluation...
| From: | Chris Shiflett | Date: | Thu, 02 Jan 2003 17:04:27 +0000 |
| Subject: | Re: Multidimensional Array manipluation... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129963@lists.php.net to get a copy of this message | ||
--- Dhaval Desai <da_linuxguru@hotmail.com> wrote:
> $test[0] = "hey";
> $test[1] = "hi";
> $test[2] = "hello";
>
> Now I want to hold various values in $test[0]["hey"] =
> "1" and $test[1]["hi"] = "2" and $test[2]["hello"] =
> "3"
Try this instead:
$test["0"]["hey"] = 1;
$test["1"]["hi"] = 2;
$test["2"]["hello"] = 3;
Also, remember that you can often learn these types of
things with trial and error by using the print_r()
function:
print_r($test);
Chris