Değişken adının bir parçası olarak bir sayaç kullanarak bir değişken erişmek

0 Cevap php

Ben böyle somthing yapmaya çalıştım:

$cat1 = array('hello', 'everyone');
$cat = array('bye', 'everyone');

for($index = 0; $index < 2; $index++) {
echo $cat$index[1];
}

It doesn't work of course. What do I need to change here?

0 Cevap