<div class = "">
<?php
// Fraunt Raiz Developer
$myString = $leads_details->attachment;
$myArray = explode(',', $myString);
foreach($myArray as $my_Array){
//echo $my_Array.'<br>';
?>
<?php
//$ext = end(explode(".", $my_Array));
//$ext = mb_substr( $my_Array, -3, null, 'UTF-8') ;
$ext[1] = substr($my_Array, -3);
echo '';//$ext[1]; // will give you the extension.
if($ext[1]=="JPG" || $ext[1]=="GIF" || $ext[1]=="JPEG" || $ext[1]=="svg" || $ext[1]=="PNG" || $ext[1]=="BMP" || $ext[1]=="jpg" || $ext[1]=="gif" || $ext[1]=="jpeg" || $ext[1]=="svg" || $ext[1]=="png" || $ext[1]=="bmp")
{
echo '<img class="img-responsive"
src="'.$my_Array.'" height="200px" width="200px"
alt="">';
}elseif($ext[1]=="PDF" || $ext[1]=="pdf"){
?>
<iframe src="<?php echo $my_Array; ?>" style="position: relative; overflow: hidden;" height="200px" width="200px" frameborder="0"></iframe>
<?php
}elseif($ext[1]=="OCX" || $ext[1]=="OC" || $ext[1]=="ocx" || $ext[1]=="oc"){
?>
<iframe src='<?php echo "https://docs.google.com/viewer?url=".str_replace(' ', '', $my_Array)."&embedded=true"; ?>' frameborder='0'></iframe>
<?php
}
?>
<?php
}
?>
</div>
0 Comments
Good day precious one, We love you more than anything.