0
I have a variable that are the footage of the building units and each unit is separated by "|"
and may have up to 4 units, ex: 35|41|50|12
.
But it doesn’t always have 4 units, ex: 41|50||
Then I need to "break" this variable into individual variables and I thought to do with explode:
$unidades = $row->fotos;
$unidades = explode("|", $unidades);
$un0 = $unidades[0];
$un1 = $unidades[1];
$un2 = $unidades[2];
$un3 = $unidades[3];
The problem in this case is that then he brings the $photos[] empty tbm.
How can I bring only those that have some value? And also get the highest and lowest value?
In short what I need is for you to take the amount 35|41|50|12
for example and show the lowest and highest value, something like:
echo $menorvalor. ' à '.$maiorvalor.'
cool, I’ll try here
– Leandro Marzullo