sorlaker
03-29-2010, 11:06 AM
hi guys i'd glad with someone help me to figure out how to output another collumn on my code well this is the code thanks!
<?php
$uploaddir = 'txt/';
$uploadfile = $uploaddir . basename($_FILES['teext']['name']);
echo '<pre>';
if (move_uploaded_file($_FILES['teext']['tmp_name'], $uploadfile)) {
echo "<h2>UPADO DE BOOOUA, o arquivo ta na pasta txt!\n</h2>";
} else {
echo "<h2>Tem algum erro no arquivo TXT aí doido!\n</h2>";
}
//echo 'Info pra DEBUG:';
//print_r($_FILES);
print "</pre>";
$arquivo = $uploadfile;
//$arquivo = $_FILES['teext']['tmp_name'];
//$arquivo = $_POST['arquivo'];
//$epi = file( 'txt/'.$arquivo );
$epi = file( $arquivo );
$a=1;
echo '<table width="75px" border="1px" style="border-collapse:collapse;">
<tbody>
<tr style="background-color: rgb(172, 201, 235);">
<td><strong>MKV</strong></td>
</tr>';
foreach ($epi as $key => $value)
{
$epi[$key] = array();
$epi[$key] = explode(" ", $value);
// The following will output: Episode 1
echo '<tr><td>'; // start row
echo '<a target="_blank" href='.$epi[$key][0].'>Episode '.$a++.'</a>';
echo '</td></tr>'; // end row
}
echo '</table>'; // end table..
?>
now how can i make another collumn for another txt file?
outputing two collumns like MKV and RMVB
thanks:D
<?php
$uploaddir = 'txt/';
$uploadfile = $uploaddir . basename($_FILES['teext']['name']);
echo '<pre>';
if (move_uploaded_file($_FILES['teext']['tmp_name'], $uploadfile)) {
echo "<h2>UPADO DE BOOOUA, o arquivo ta na pasta txt!\n</h2>";
} else {
echo "<h2>Tem algum erro no arquivo TXT aí doido!\n</h2>";
}
//echo 'Info pra DEBUG:';
//print_r($_FILES);
print "</pre>";
$arquivo = $uploadfile;
//$arquivo = $_FILES['teext']['tmp_name'];
//$arquivo = $_POST['arquivo'];
//$epi = file( 'txt/'.$arquivo );
$epi = file( $arquivo );
$a=1;
echo '<table width="75px" border="1px" style="border-collapse:collapse;">
<tbody>
<tr style="background-color: rgb(172, 201, 235);">
<td><strong>MKV</strong></td>
</tr>';
foreach ($epi as $key => $value)
{
$epi[$key] = array();
$epi[$key] = explode(" ", $value);
// The following will output: Episode 1
echo '<tr><td>'; // start row
echo '<a target="_blank" href='.$epi[$key][0].'>Episode '.$a++.'</a>';
echo '</td></tr>'; // end row
}
echo '</table>'; // end table..
?>
now how can i make another collumn for another txt file?
outputing two collumns like MKV and RMVB
thanks:D