Not sure on this one and was hoping you would be able to help me out on this one ...
Here's my code
Loader::library('file/types');
$ih = Loader::helper('image');
$names = explode("||",$this->tName);
$urls = explode("||",$this->tUrl);
$fIDs = explode("||",$this->fID);
Loader::model('file');
$i = Loader::helper('image');
$v = array();
$cc = 0;
foreach ($names as $k=>$n){
if (intval($fIDs[$k]) > 0 ) :
$img = $test = File::getByID($fIDs[$k]);
$fv = $img->getExtension();
$ft = FileTypeList::getType($fv);
$img = $ft->type == 1 ? $img : false;
else :
$img = false;
endif;
$v[$cc]['name'] = $n;
$v[$cc]['url'] = $urls;
$v[$cc]['src'] = $img ? $ih->getThumbnail($img,100,100)->src : false;
$cc ++;
}
return $v;
And what i'm having issues with is getting the array values from $urls within this code. (5th last one)
foreach ($names as $k=>$n){
if (intval($fIDs[$k]) > 0 ) :
$img = $test = File::getByID($fIDs[$k]);
$fv = $img->getExtension();
$ft = FileTypeList::getType($fv);
$img = $ft->type == 1 ? $img : false;
else :
$img = false;
endif;
$v[$cc]['name'] = $n;
$v[$cc]['url'] = $urls;
$v[$cc]['src'] = $img ? $ih->getThumbnail($img,100,100)->src : false;
$cc ++;
}
return $v;
Thanks for all your help. Appreciate it.