<?php $contents = array('content1', 'content2', 'content3', 'content4'); $types = array('pdf', 'pdf', 'txt', 'pdf'); $links = array('link1', 'link2', 'link3'); $skip_type =0; foreach ($contents as $key => $value) { echo "$value\n"; if ($types[$key] == 'pdf') { echo $links[$key + $skip_type]."\n"; }else{ $skip_type--; } }
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`