Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // if i linked keep then social icon show else not show within ul
- <?php
- if (isset($royalcusine['linkedin']) && $royalcusine['linkedin'] !=null) {
- ?>
- <li>
- <a href="<?php echo $royalcusine['linkedin']; ?>"><i class="icofont icofont-brand-linkedin"></i></a>
- </li>
- <?php
- }
- ?>
- //Within a loop to show multiple soical icons
- <?php
- foreach ($royalcusine as $key => $value) {
- if (in_array($key, ['facebook','twitter','linkedin','google-plus','pinterest']) && $value !=null) {
- ?>
- <li>
- <a href="<?php echo $value; ?>"><i class="icofont icofont-social-<?php echo $key; ?>"></i></a>
- </li>
- <?php
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement