I have text file which looks like this:
http://www.books.com/imgs/b0388.jpg , ../../mdia/imp/books/b0388.jpg
http://www.books.com/imgs/b0369.jpg , ../../mdia/imp/books/b0369.jpg
http://www.books.com/imgs/b0309.jpg , ../../mdia/imp/books/b0309.jpg
Now I need to separate the url and the path with table columns with removing the comas of course (I want them in different table columns). After that I had to put buttons and forms at some right columns. My code is as follows:
<?php
$filename="listing.txt";
$fp=fopen($filename,'r');
if ($fp == FALSE){
echo "File not opened";
return 0;}
//Default product name before administrator's modifications
$default="Product";
while ( ! feof( $fp ) ) {
$line = fgets( $fp, 1024 );
echo $line;
echo $default;
echo "<input type='text'></input>";
echo "<button type='button'>Name product</button>";
echo "<br/>";
}
fclose($fp);
?>