Let's say we have a JSON with 2 elements below:
exemplo: {
[{
"arquivo": "Arquio 1",
"size": "2340"
}, {
"arquivo": "Arquivo 2",
"size": "0"
}, {
"arquivo": "arquivo 3",
"size": "4329"
}
Use for () PHP to list the files.
For example:
for($i=0; $i<=10; $i++)
{
$arquivo = $json->exemplo[$i]->arquivo;
$size = $json->exemplo[$i]->size;
echo "Nome: ".$nome." - ".$size."<br />";
}
What I want to do is to ignore files from the list that has size "0" and leave only those larger than 0 before moving on to PHP.
Can anyone help me?