test index in array

This commit is contained in:
Michael RICOIS 2013-05-06 19:55:40 +00:00
parent b8191c3fe1
commit 9703c8e258

View File

@ -3,7 +3,7 @@
<?php foreach ($this->ws as $key => $ws) {?>
<li>
<?php if ($ws['type'] == 'client'){?>
<?php if (array_key_exists('type', $ws) && $ws['type'] == 'client') {?>
<a href="<?=$this->url(array('controller' => 'documentation', 'action' => 'clients', 'nom' => strtolower($key)))?>">
<?=ucfirst($key)?>
</a>
@ -16,10 +16,8 @@
<?php if (isset($ws['version'])) { ?>
<ul>
<?php
foreach ($ws['version'] as $version => $versionElement){
if ($versionElement['actif']) {
?>
<?php foreach ($ws['version'] as $version => $versionElement) { ?>
<?php if ($versionElement['actif']) { ?>
<li>
<?php if ($ws['type'] == 'client'){?>
<a href="<?=$this->url(array(
@ -38,10 +36,8 @@
<?php echo ( $versionElement['defaut']) ? '(défaut)' : '';?>
</li>
<?php
}
}
?>
<?php } ?>
<?php } ?>
</ul>
<?php } ?>