//处理选项
//字符串转数组
$ktlists[$k]['content'] = explode(",", $v['content']);
//查询字符串里是否还存在
$cc = 'http://';
$pos = strpos($ktlists[$k]['content'][0],$cc);
if($pos){
//处理选项里的图片地址
$aa = explode(",",$ktlists[$k]['content'][0]);
//数据
$bb0 = $aa[0];
//添加HTML标签
$bb1 = "<img src='$aa[1]' />";
//重新拼接上
$ktlists[$k]['content'][0] = $bb0.','.$bb1;
}else{
}
$pos = strpos($ktlists[$k]['content'][1],$cc);
if($pos){
//处理选项里的图片地址
$aa = explode(",",$ktlists[$k]['content'][1]);
//数据
$bb0 = $aa[0];
//添加HTML标签
$bb1 = "<img src='$aa[1]' />";
//重新拼接上
$ktlists[$k]['content'][1] = $bb0.','.$bb1;
}else{
}
$pos = strpos($ktlists[$k]['content'][2],$cc);
if($pos){
//处理选项里的图片地址
$aa = explode(",",$ktlists[$k]['content'][2]);
//数据
$bb0 = $aa[0];
//添加HTML标签
$bb1 = "<img src='$aa[1]' />";
//重新拼接上
$ktlists[$k]['content'][2] = $bb0.','.$bb1;
}else{
}
$pos = strpos($ktlists[$k]['content'][3],$cc);
if($pos){
//处理选项里的图片地址
$aa = explode(",",$ktlists[$k]['content'][3]);
//数据
$bb0 = $aa[0];
//添加HTML标签
$bb1 = "<img src='$aa[1]' />";
//重新拼接上
$ktlists[$k]['content'][3] = $bb0.','.$bb1;
}else{
}
?
|