Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $cores = array (
- 'vermelhas' => array ('maçã','morango','cereja','acerola'),
- 'verdes' => array ('banana','melão'),
- 'amarelas' => array ('abacate','kiwi','pera')
- );
- ?>
- <?php foreach( $cores as $cor => $frutas ): ?>
- <p>
- <p><?php echo $cor; ?></p>
- <ul>
- <?php foreach( $frutas as $fruta ): ?>
- <li><?php echo $fruta; ?></li>
- <?php endforeach ?>
- </ul>
- </p>
- <?php endforeach ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement