Jump to content

sks2416

New Members
  • Posts

    2
  • Joined

  • Last visited

sks2416's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Have some code I loop through results and now moving to php 8 the 'each' function is no longer working. Need some help with a replacement. while ($row1 = mysqli_fetch_array($result1) ) { $pics_array = explode(';', $row1['image_url']); $cap1_array = explode(';', $row1['img_cap_1']); $cap2_array = explode(';', $row1['img_cap_2']); } $count_total = count($pics_array); for ($counter=0; $counter < $count_total; $counter++) { $line = each ($pics_array); print "<div class=\"slide\"><div class=\"image\"><a href=\"#\"><img src=\"slider/$line[value]\" /></a></div>"; $line1 = each ($cap1_array); print"<span class=\"caption1\">$line1[value]</span>"; $line2 = each ($cap2_array); print"<span class=\"caption2\">$line2[value]</span>"; print"</div>"; }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.