Hello,
I have some strings...
$product_1 = 0
$product_2 = 1
$product_3 = 0
$product_4 = 1
etc...
...and I want to call one of the strings based on a variable $i
e.g. $i = 1 (o $i = 2, o $i = 3, etc...)
When $i == 3 I want to call $product_3
How do I do it?
I tried...
$varProduct = "\$product_".$i
echo "$varProduct"
...but this displays the word "$product_3" and not the value of the string $product_3 which should be "0".
Thank you for any help you can give me...