Loops and Variables
Posted: Fri Jun 23, 2006 9:01 pm
I'm trying to check the values for $songname0 through 9 and same for $songfile.
The code below is the best I could come up with. But alas, it just reads the values of $i.
The code below is the best I could come up with. But alas, it just reads the values of $i.
Code: Select all
for($i = 0; $i < 10; $i++) {
if ($songfile.$i != "" && $songname.$i != "") {
//Song Present - Run Tests
echo $songfile.$i."<br>";
echo $songname.$i."<br>";
echo "Slot ".$i." contains valid data<br>";
}
}