arrays
| From: | roslyn jose | Date: | Mon, 23 Sep 2002 07:51:02 +0000 |
| Subject: | arrays | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-21922@lists.php.net to get a copy of this message | ||
hello,
im not sure of how to create a 1-d array. i want to read a text file and put each line into an
array, i wrote the following piece of code but got errors,
<?php
$conn=pg_connect("host=abcd/djkfhjd/ dbname=ucs user=roslyn password=roslyn");
$filename="note.txt";
$fp = fopen ($filename,"r");
$len=filesize($filename);
while (!feof ($fp))
{
$buffer = fgets($fp,$len);
$charcs= array($buffer);
echo "$charcs <br>";
}
fclose($fp);
?>
basically i need to store the txt file data into the posgresql database. the output of the above
code is: array, array....(4 times)...pls help me here. thanx
roslyn
---------------------------------
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!