Hello,
I have this .txt file :
Roger|tow25$ran k259
Isabelle|tow36$ rank24
Pascal|tow12$ra nk29
Sergeï|tow45$ra nk5
Michel|tow1245$ rank45478
Frédéric|tow1$r ank125425
And this programm php3
<?php
$fichier = "classeur.t xt";
if($fp = fopen($fichier, "r")){
$ligne=1;
echo "<table border=1 bordercolor=\"# 00CCFF\" width=500>\n";
echo "<tr align=center><t d colspan=3>TITRE </td>";
while (!feof($fp)) {
list( $name, $tampon ) = explode( "|tow", $fp );
list( $tow, $obj ) = explode ( "$rank", $tampon );
echo "\t<tr>";
echo "<td
align=center><b >Nom".$name." </b></td><td>Tow".$to w."</td><td>Obj".$ob j."</td[color=blue]
>";[/color]
echo "</tr>\n";
$ligne++;
echo "</table>\n";
echo "$cell";
fclose($fp);
}else{
echo "Error : open impossible ".$fichier;
exit();
}
?>
I would like to past each value of the lines in the tex file, in 3 variables
$nom; $tow; $obj
and create a table with 3 column ( column 1 the name, in 2 the tow, and in 3
the obj)
But htis not work
There must be an error, but i don't know where.
Thanks by advance
--
*************** *******
SOCARA S.A.
Strasbourg
I have this .txt file :
Roger|tow25$ran k259
Isabelle|tow36$ rank24
Pascal|tow12$ra nk29
Sergeï|tow45$ra nk5
Michel|tow1245$ rank45478
Frédéric|tow1$r ank125425
And this programm php3
<?php
$fichier = "classeur.t xt";
if($fp = fopen($fichier, "r")){
$ligne=1;
echo "<table border=1 bordercolor=\"# 00CCFF\" width=500>\n";
echo "<tr align=center><t d colspan=3>TITRE </td>";
while (!feof($fp)) {
list( $name, $tampon ) = explode( "|tow", $fp );
list( $tow, $obj ) = explode ( "$rank", $tampon );
echo "\t<tr>";
echo "<td
align=center><b >Nom".$name." </b></td><td>Tow".$to w."</td><td>Obj".$ob j."</td[color=blue]
>";[/color]
echo "</tr>\n";
$ligne++;
echo "</table>\n";
echo "$cell";
fclose($fp);
}else{
echo "Error : open impossible ".$fichier;
exit();
}
?>
I would like to past each value of the lines in the tex file, in 3 variables
$nom; $tow; $obj
and create a table with 3 column ( column 1 the name, in 2 the tow, and in 3
the obj)
But htis not work
There must be an error, but i don't know where.
Thanks by advance
--
*************** *******
SOCARA S.A.
Strasbourg
Comment