Jump to content

How To Set Php Request If Option Is Empty Dont Show That


MahdiRiyahi

Recommended Posts

this is my code: i want

$theme['type']

just whene show this arry have somting. but in this code this tag if dont have somting also load this tag

<?php
foreach ($theme_array as $i => $theme) :
echo '<li ><a href="#" rel="' . $theme['url'] . ',' . $theme['themeforest'] . '">' .
ucfirst($theme['id']) .
' <span class="product-type">'.$theme['type'].'</span>';
if(isset($theme['preview'])){
echo '<span class="product-preview"><img src="';
if(strpos($theme['preview'], 'http://') === false){
echo 'product_previews/'.$theme['preview'];
}
else echo $theme['preview'];
echo '" /></span>';
}
echo '</a></li>';
endforeach;
?>

 

this is my arry code:

$theme_array = array (
array ("id" => "سیمرغ (JM Thunderbird)",
   "link" => "Thunderbird",
   "preview" => "http://localho/5/screen/jm-ascent-blue.jpg",
   "url" => "http://demo.joomi.ir/tlate/jmphoenix/",
   "themeforest" => "http://uy"
  ),

array ("id" => "فونیکس (JM Phoenix)",
   "type" => "جوملا ۲.۵",
   "free" => "رایگان",
   "link" => "phoenix",
   "preview" => "http://localhost/5/screen/jm-ascent-blue.jpg",
   "url" => "http://demo.joomi.ir/template/jmphoenix/",
   "themeforest" => "http://buy"
  )
);

& this is my problem in picture :

17901696217618455210.jpg

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.