PHP Help (Compressing code)
-
Hi,
I not that good at php so I was wondering if some wouldn’t mind shortening this bit of code:
<?php echo('<img src="/forums/avatars/' . $current_user->user_login . '.jpg" />'); ?>
<?php echo('<img src="/forums/avatars/' . $current_user->user_login . '.png" />'); ?>
<?php echo('<img src="/forums/avatars/' . $current_user->user_login . '.gif" />'); ?>
<?php echo('<img src="/forums/avatars/' . $current_user->user_login . '.jpeg" />'); ?>Basically it is supposed to go through every file extension allowed by the avatar plugin and display the image with the actual extension, there can be only one.
It is used to display Avatars in WordPress by the way without loading bbPress.
Any help would be great!
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.