0
I did a search and couldn’t find a code to leave only the first 4 characters of a string with a smaller size.
I tried this code:
$str = "Códigos";
$str = strtolower($str);
Only that I need to leave are the first 4 numbers smaller than the others. What I always find refer to strings.
Oxe, a negative less than 8 seconds.
– Thiago Lunardi
I gave you -1 because despite being an attempt to help, you didn’t take into consideration that AP might not understand what language this is. And the question tag is PHP.
– user28595
I gave -1 because not only is the answer not in accordance with the question, the question is still weak, immature and should not be rewarded.
– Marco Aurélio Deleu
Poxa @Diegofelipe , is not pq do not know the exact address I can not point the right direction. I made it clear in the answer that I do not know PHP, but the way is that same.
– Thiago Lunardi
@Marcoauréliodeleu, ok, you don’t need to make me positive/reward. But you didn’t need to make me negative, because that’s the way.
– Thiago Lunardi
Don’t get me wrong, but if I have a question in java and you give me an example in C# pq are similar, it’s not the same thing as showing a direction. Add a small explanation of what the code does, because in addition to showing in another language, you haven’t even explained how the code works. The intention of -1 is to make the response better only, not an attempt to retaliate.
– user28595
@Diegofelipe, justo. I edited the answer. Really I could deliver a better answer.
– Thiago Lunardi
@Marcoauréliodeleu, I edited the answer. Can validate, please?
– Thiago Lunardi
@Danielomine, I edited the answer and your edition is gone. But thanks for the contribution with PHP.
– Thiago Lunardi
@Thiagolunardi, as I said, the question is not only the lack of quality in your answer, but also the lack of quality of the question. I don’t think questions like that should be encouraged. I commented to the author about the flaws of the questions and so far it has not published trial code, errors, nothing. Suggested reading: http://meta.stackoverflow.com/a/308358/1014588
– Marco Aurélio Deleu