1
I have a PHP array, as illustrated below. I know I can filter them through (foreach, for example) and seeing if a value meets a certain criterion. But there is some simpler and faster way to make this filter?
<?php
$clientes = [
['id' => 1, 'nome' => 'Alefe', 'valor_autorizado' => 12159.99],
['id' => 2, 'nome' => 'Bete', 'valor_autorizado' => 35122.00],
['id' => 3, 'nome' => 'Guimel', 'valor_autorizado' => 86242.90]
['id' => 4, 'nome' => 'Dalete', 'valor_autorizado' => 2342.31]
];
For example, I want all customers with an authorized value greater than R $ 40.000,00.
Perfect, that’s just what I need! A question, I can apply more than one filter within the function?
– Andrey
Ahhh was faster :'( .... hehehe :D +1
– Guilherme Nascimento
@Andrey Yes. I edited my reply and added this option as well.
– Valdeir Psr