note
The_Dj
Having a look at the forest with all those trees in the way...<br/>
<br/>
Functionally, pop does 2 things: <br/>
1] removes the last element from an array and<br/>
2] returns that last element (for you to do things with)<br/>
<br/>
Passing a literal array rather than a named variable means that the balance of the array is lost to the great bit-bucket in the sky immediately.<br/>
That means that the effect 1] above is lost.<br/>
That means that all you are <i>really</i> doing is 2] - getting the last entry in a list.<br/>
<br>
and <i>that</i> is very easily:
<code>
$x=[1,3,5,7,9]->[-1]
</code>
or
<code>
print [1,3,5,7,9]->[-1]
</code>
<small>(Well, hard-coded like this, you may as well just grab the '9' and be done, but let's pretend this is auto-generated in an eval or something.)</small><br/>
<br/>
HTH
11109616
11109616