I have this code:
echo $b1[1][wood]; // It would say 100
But i want to change the 1 in $b1, for example:
$id = 1;
echo $b(The $id here)[1][wood];
I tried
echo $b'.$id.'[1][wood];
But it didnt work. Does any one have any suggestions ?
Thanks
Try this:
$id = 1;
echo ${'b'.$id}[1]['wood'];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With