Hello, I come across strings of this type:
Emirates EK 262
Air Canada AC 091
Lan Airlines LA 761
I know that from the end to the beginning the quantity does not change, ie if I want to get the name first name, regardless of whether or not it is a composite name, I start counting from the end part forward, which does not I will have errors.
I need to get the name without the prefix of 2 digits and the number of 3 digits. that is, in my substr, I know the position I get is -7. Now the problem is how do I get what's ahead of it, from the end to the beginning?
$mais_detalhes['operado_por'] = substr($trecho[4],-7,*O que coloco aqui?);