B
bing
The expected output should be:
=====
zero, 0
one, 1
two, 2
=====
This is the code snippet. I know it's not correct. Hence the question
in the subject.
============
$name0 = 0;
$name1 = 1;
$name2 = 2;
%map = (
name0 => 'zero',
name1 => 'one',
name2 => 'two'
);
for ($j=0;$j<=2;$j++)
{
print "$map{name{$j}}, $name{$j}\n";
}
=========
Appreciate any help.
Bing
=====
zero, 0
one, 1
two, 2
=====
This is the code snippet. I know it's not correct. Hence the question
in the subject.
============
$name0 = 0;
$name1 = 1;
$name2 = 2;
%map = (
name0 => 'zero',
name1 => 'one',
name2 => 'two'
);
for ($j=0;$j<=2;$j++)
{
print "$map{name{$j}}, $name{$j}\n";
}
=========
Appreciate any help.
Bing