1
Hello, I come across strings like that:
Emirates EK 262
Air Canada AC 091
Lan Airlines LA 761
I know that from the end to the beginning the amount does not change, IE, if I want to get the name first name, regardless of whether it is a compound name or not, I start counting from the end part forward, I will not have mistakes.
I need to get the name without the 2 digit and 3 digit number. I mean, in my place, I know the position I get is -7. Now the problem is how do I get what’s ahead of this, from the end to the beginning?
$mais_detalhes['operado_por'] = substr($trecho[4],-7,*O que coloco aqui?);
What should the output string be? maybe you don’t even need the
substr()
– rray
Give an example of what you need. Before and After. Reading what you wrote I couldn’t understand what you want.
– Diego Souza