ElkArte Community

Project Support => General ElkArte discussions => Topic started by: IchBin on January 25, 2014, 08:52:21 pm

Title: Umm what?
Post by: IchBin on January 25, 2014, 08:52:21 pm
What is the purpose of this? lol

Code: [Select]
$temp = array_shift($context['linktree']);
array_unshift($context['linktree'], $temp);

This just pops the first item on the array, and then puts it right back on right? Am I not understanding how these functions work?
Title: Re: Umm what?
Post by: emanuele on January 26, 2014, 01:08:01 pm
mmm... I think so...
Should it go the The best funny code contest (http://www.elkarte.net/community/index.php?topic=923.0)? :P
Title: Re: Umm what?
Post by: IchBin on January 26, 2014, 05:38:02 pm
Um yes, that is probably a good idea. lol Unfortunately, I can't merge here.
Title: Re: Umm what?
Post by: Joshua Dickerson on January 27, 2014, 08:43:12 am
Where is that? I am guessing if you look at its history, there was something between there that didn't want to use the first element.
Title: Re: Umm what?
Post by: IchBin on January 28, 2014, 05:49:33 pm
It's code in TP that I just happened to spot. :)