How to get file extension from this array in PHP

I have this array

        array(1) {
      array(5) {
        string(23) "2021-05-14_20-59-00.jpg"
        string(10) "image/jpeg"
        string(24) "K:\xampp\tmp\php4967.tmp"

I only want to get the 2021-05-14_20-59-00.jpg and extract the file extension.

I tried it like this:


but the output is like this:

string(23) "2021-05-14_20-59-00.jpg"

I only want to get this 2021-05-14_20-59-00.jpg so i can put it on the pathinfo argument and extract the extension.