Data separated by a character and displayed in an array

I need to get data separated from the line by the | character from one line and display them in an array. For example, data [5] prints 18.90

Can you help how to do it? I'm a beginner in coding. In PHP it is done I think via explode()

Thank you very much for your help.

2020-07-19 21:21:24|-76|20.18|979.86|63.73|18.90|87.97|164.26|0|0.00|0.00|-127.00|-127.00|-127.00|-127.00|19.06|339|87|163.42|174.37|176.54|65.00

You can use strtok() and go through your string in a while loop