You might want to start out by looking on how arrays work. Also if you don't know "what" an array is, look over this Wikipedia entry.
Examples from PHP.NET
Declare an indexes and values
<?php
$arr = array("foo" => "bar", 12 => true);
echo $arr["foo"]; // bar
echo $arr[12]; // 1
?>
Here is another example with the results
<?php
// Create a simple array.
$array = array(1, 2, 3, 4, 5);
print_r($array);
// Now delete every item, but leave the array itself intact:
foreach ($array as $i => $value) {
unset($array[$i]);
}
print_r($array);
// Append an item (note that the new key is 5, instead of 0).
$array[] = 6;
print_r($array);
// Re-index:
$array = array_values($array);
$array[] = 7;
print_r($array);
?>
Result of the above:
Array
(
[0] => 1
[1] => 2
[2] => 3
[3] => 4
[4] => 5
)
Array
(
)
Array
(
[5] => 6
)
Array
(
[0] => 6
[1] => 7
)
Your special problem
Now it looks to me that you want to select each name from each record / row in your array / list.
To do this you need to loop / iterate throughout the array and write the current rows name-value.
Example on looping with arrays
<?php
$people = Array(
Array('name' => 'Kalle', 'salt' => 856412),
Array('name' => 'Pierre', 'salt' => 215863)
);
for($i = 0; $i < sizeof($people); ++$i)
{
echo $people[$i]['name'];
}
?>
Doing this without loops
So let's say that you know that your array only has two values, well then if you had an array looking like this:
$arr = array(10, 20);
You could write something like this to write them out:
echo $arr[0];
echo $arr[1];
Remember that when you tell your array which "row" to get, you always say "how many steps to go", meaning that if you want the first value, you take 0 steps, therefore the index is... 0!
Object orientation and arrays
Since you are using an object in your array you might want to check out some information about PHP and Object Oriented Programming.
Side note and a cool example
See this cool example which might give you an idea on what you can do
<?php
$obj = (object) array('foo' => 'bar', 'property' => 'value');
echo $obj->foo; // prints 'bar'
echo $obj->property; // prints 'value'
?>