Question for PHP Arrays
| From: | Saul Rennison | Date: | Thu, 27 Apr 2006 19:51:13 +0000 |
| Subject: | Question for PHP Arrays | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-235017@lists.php.net to get a copy of this message | ||
Hi,
I'm making a PHP Installer that is customizable by using plugins, I haven't
used PHP for a while and which I have forgotten some things about PHP *eek*...
Anyway, I want to know how to add things to an array. Like this:
$foobar = array()
$foobar['rar']['miaw']
Would that output come out (for the array) as:
array(
'rar' => 'miaw'
)
Please correct me if wrong. Also I need to ask one more question, would this
work:
$foobar = array()
function addToArray($int, $value) {
$foobar[$int][$value]
}
And with a function call addToArray(1, "meow") output as the array looking
like:
array(
'1' => 'meow'
)
--
Thanks,
dphiance (Saul Rennison)