$somearray = array(
array('a' => 'Hello'),
array('b' => 'World')
);
echo $somearray[0]['a'] . ' ' . $somearray[1]['b'];
// Hello World
ShawnCplus
Code Monkey
1,583 posts since Apr 2005
Reputation Points: 526
Solved Threads: 268
thanks for the advice
so using the first example:
if [0] had [a][b][c]
all i'd need to do to access an array and assign the contents to vars would be (using first example):
$avar = $somearray[0]['a'];
$bvar = $somearray[1]['b'];
echo $avar;
echo $bvar;
// Hello
// World
Precisely. If you want to get really deep into how arrays work take a look at the language documentation. http://php.net/arrays
ShawnCplus
Code Monkey
1,583 posts since Apr 2005
Reputation Points: 526
Solved Threads: 268