hello everyone!
for example, i have the following array:
$p = "hello.html.c";
$p1 = explode('.', $p);
now, if i want to access the extension (c, or index 2 in this case), i would have to do $p1[sizeof($p1) - 1].
I'm used to in python's list just doing p[-1] to accessing elements from the back. I was wondering if there is a similarly easy way of doing this in php.
Any help would be much appreciated!