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
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
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");
> >
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
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
// 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
6 matches
Mail list logo