underscores before array values

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

underscores before array values

Post by Luke »

I am looking at a script somebody else wrote right now... and this is what it looks like... why the underscores before the values? Could that be a function or something?

Code: Select all

$month_names = array(
                1 => _('January'),
                _('February'),
                _('March'),
                _('April'),
                _('May'),
                _('June'),
                _('July'),
                _('August'),
                _('September'),
                _('October'),
                _('November'),
                _('December'),
                );
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

see http://de2.php.net/function.gettext

edit: and if you take a closer look at the syntax highlighter you will find the first underscore to be a link to http://www.php.net/_
takes you to the same page :]
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Does this have anything to do with a WordPress implementation? They use some weird function names in their app similar to that style.
Post Reply