Basic PHP Question...
Is it okay to use the same variable name ($image) over and over again in the same php file, if you keep changing it's value? Or do you need to do $image1, $image2 and so on...?
It's working to do it with the same variable/different values, but I'm not sure if it's a bad practice? (I'm still learning, obviously.)
Here's a simplified example:
$image = get_field('image_3');
echo $image
...
$image = get_field('image_5');
echo $image
Also, I'm referring to what I assume are global variables. The variable is not set within an individual function. Do I need to unset the variable each time if I do it this way? Or is this ok?
Thanks!