$image1,$image2,$image3,$image4,$image5. The same with the sku variables
for ($i = 1; $i <= 5; $i++) {
$test_image = '$image'.$i;
$test_sku = '$sku'.$i;
if(strlen($test_image) !=0 && strlen($test_sku) !=0){
array_push($array,$trend,$test_image,$test_sku);
}
}
I want to check these variables in the if statement. The aforementioned code of course doesn’t work. Can anyone tell me how can I check all the variables into the statement?
I think this can be done by using double $: