I have an array saved as a variable
$custgalarr=explode(",",$custgallinks);
If I print this like so, it shows up like this
$closeLink='</a>'.print_r($custgalarr);
Array ( [0] => cat [1] => dog [2] => moose )
I want to be able to have:
$closeLink='</a><a href="cat"><a href="dog"><a href="moose">'
But I can not get a foreach to work. How would I set $closeLink to dynamically create the for each item that is in the array?
Thanks for the help
foreach?