Bu diziler döngü kullanarak im ne olduğunu.
$csvpre = explode("###", $data);
$i = 0;
$bgc = 0;
foreach ( $csvpre AS $key => $value){
$info = explode("%%", $value);
$i++;
if($i == "1"){
echo "<tr bgcolor=#efefef><td></td>";
foreach ( $info as $key => $value ){ echo "<td>$value</td>"; }
echo "</tr>";
} else {
if($bgc=1) { $bgcgo = "bgcolor=\"#b9b9b9\"" ;} else { $bgcgo = "bgcolor=\"#d6d6d6\""; }
echo "<tr $bgcgo><td></td>";
foreach ( $info as $key => $value ){ echo "<td>$value</td>"; }
echo "</tr>";
$bgc++;
}
}
How can i add an if/elseif statement to the last foreach, so that the output changes on a given line of the array.
Say i want <td>$value</td>
for all unless specified, but on line 30, i want <textarea>$value</textarea>