Hi,
I have made this function:
$contents[5] = ""; //I put to "zero" the value at index 5, then I display all the records in the array except the ones of zero lenght. At the same time I woul like to put the records that are not zero into a new array.
for($counter=0; $counter<$length; $counter++)
{
if ($contents[$counter] <> "") {
echo ($contents[$counter]."<br>");
$utentiaggiornati = array($contents[$counter]);
}
}
echo ("<br>");
echo ($utentiaggiornati[0]);
As you can see there is something wrong because only the last array position is recorded into the new array.
Which is the roght syntax to add values to the array ?
Is it possible to take all the records in the array and put them into a string of text ?
Thank you