I have three PHP arrays and I want to use them in the same loop to get the values.
$advertising_advpic = "photo src1,photo src2,photo src3";
$advertising_advlink = "site link1,site link2,site link3";
$advertising_advtitle = "site name1,site name2,site name3";
$advpic = explode(",",$advertising_advpic);
$advlink = explode(",",$advertising_advlink);
$advtitle = explode(",",$advertising_advtitle);
for ( $i = 0; $i<count($advpic); $i++)
{
$link = $advlink [$i];
$pic = $advpic [$i];
$title = $advtitle[$i];
$all = "<td nowrap><a target='_blank' href='".$link."'><img src='".$pic."' border='0' alt='".$title."'></a></td>";
}
But when I print $all I only get the last value.