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!