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