how to get value or same name variable but end with different index
$item1='100';
$item2='200';
$item3='300';
$item4='400';
$item5='500';
for ($i=1;$i<4;$i++){
echo '--'.$($item.$i); // or echo '--'.$.'item'.$i);
}
i have variable $item1,2,3,.... i don't know how many item variable i got . i got total no of item variable so i want to go with loop and print all item variable value . i write above code but error occur . any one know how to get each item value ????