Re: [PHP] Extracting data from exec() call

2011-06-14 Thread Jim Lucas
On 6/14/2011 10:35 AM, Ashley M. Kirchner wrote: > > I'm trying to extract data coming from an exec() call. The exec() call is > performing an ncdump on a netCDF file: > >$filename = "mlab.20110101.cdf"; > exec("/usr/bin/ncdump -l 2048 -v wmax ".$filename, $output); > ech

RE: [PHP] extracting data from text file

2002-07-01 Thread Beverly Steiner
Here's one way assign each line: "; echo "state is $state"; echo "city is $city"; echo "comapny is $company"; echo "division is $division"; echo "url is $url"; echo "email is $email"; fclose($whattoread); ?> Bev -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sen

Re: [PHP] extracting data from text file

2002-07-01 Thread Pushkar Pradhan
Just use file(), this is most appropriate for reading file line by line. http://www.php.net/manual/en/function.file.php > > On Monday, July 1, 2002, at 05:17 PM, [EMAIL PROTECTED] wrote: > > > I have trend this but it does not work properly > > > > $fp = @fopen(file.txt,"r"); > >

Re: [PHP] extracting data from text file

2002-07-01 Thread Erik Price
On Monday, July 1, 2002, at 05:17 PM, [EMAIL PROTECTED] wrote: > I have trend this but it does not work properly > > $fp = @fopen(file.txt,"r"); > $line = explode("\n",$fp); > $valueC = "$line[0]"; > $valueST = "$line[1]"; > @fclose($fp); What er

Re: [PHP] Extracting data

2001-11-27 Thread Andrey Hristov
Produces : array(2) { [0]=> array(3) { [0]=> string(7) "#@data1" [1]=> string(7) "#@data2" [2]=> string(7) "#@data3" } [1]=> array(3) { [0]=> string(5) "data1" [1]=> string(5) "data2" [2]=> string(5) "data3" } } Best regards, Andrey

RE: [PHP] Extracting Data from a URL output

2001-01-17 Thread Benjamin Munoz
// get a web page into an array and remove html // file() returns an array, which you can then loop through $fcontents = file ('http://www.php.net'); while (list ($line_num, $line) = each ($fcontents)) { // if preg_match the weather text you are looking for // preg_replace a