MahdiRiyahi Posted December 4, 2012 Share Posted December 4, 2012 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 : Quote Link to comment https://forums.phpfreaks.com/topic/271601-how-to-set-php-request-if-option-is-empty-dont-show-that/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.