Re: [PHP] getting message from file

2004-03-09 Thread tom meinlschmidt
see php.net/file or php.net/fread $file = "somefile.dat"; if ([EMAIL PROTECTED]($file)) return 0; $filecontent = file($file); $numbers = array(); if (is_array($filecontent) && count($filecontent)) { foreach($filecontent as $line) { // delete more than one space

RE: [PHP] getting message from file

2004-03-09 Thread umesh
Hi, Try using follow. $sContents=file_get_contents("filename"); $sContents=split("",$sContents); Ande then you will be able to use the values for plotting a graph. Regards, Umesh. -- PHP General Mailing List (http://www.php.net/) T

Re: [PHP] getting message from file

2004-03-09 Thread Kenneth
My data file is sth like: 2.208 2.18 2.415 2.283 2.234 2.155 2.389 2.201 2.204 2.181 2.43 2.285 2.231 2.164 2.387 2.197 2.2 2.179 2.429 2.29 2.225 2.181 2.385 2.195 2.196 2.178 2.424 2.291 2.225 2.213 2.386 2.19 I would like to get these data in order to plot graph.

Re: [PHP] getting message from file

2004-03-08 Thread Jason Wong
On Monday 08 March 2004 09:04, Kenneth wrote: > I have a problem on getting content from a data file (data.txt). > I have many numbers in the file...all of them are about 2.XXX, and I need > them to plot a graph. What does your data file look like? Show a few sample lines. > But I just can't re