Problem with array
| From: | Sylvain | Date: | Thu, 19 Apr 2007 17:13:02 +0000 |
| Subject: | Problem with array | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-13703@lists.php.net to get a copy of this message | ||
Hello,
I have a probleme with an array like that:
$array[1]['mother_id'] = 0;
$array[1]['father_id'] = 0;
$array[1]['name'] = foo;
$array[2]['mother_id'] = 0;
$array[2]['father_id'] = 0;
$array[2]['name'] = foo1;
$array[3]['mother_id'] = 1;
$array[3]['father_id'] = 2;
$array[3]['name'] = foo2;
In PHP I print the name of the parents with:
$array[$array[$key]['mother_id']]['name']
I tried to do the same thing with smarty :
{$array[$array[$key].mother_id].name}
But it does not work. Do you have an idea ?
Regards