Discussion:
Printing
Ethan Rosenberg
2014-08-14 04:24:16 UTC
Permalink
Dear List -

fprintf($fptr1,"\n\n"); //works
$string1 = "this is a test";
echo $string1; //works
fprintf($frpr1,"%s\n", $string1); //doesn't work

<snip>

while ($row1 = mysqli_fetch_row($result1))
{.
.
.

fprintf($fptr1, "%s\t %s\t %-9s\t %s\t\n", $row1[4] -$row1[3],
$row1[0],$row1[1],$row1[2] ); //works

}
fprintf($frpr1,"%s\n", $string1); //doesn't work

What am I doing wrong?

TIA

Ethan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Jigar Dhulla
2014-08-14 04:46:14 UTC
Permalink
Hi,

on 4th line, it should be *$fptr1*, instead of

*$frpr1*
Just a suggestion, keep error reporting on while developing. :)


On Thu, Aug 14, 2014 at 9:54 AM, Ethan Rosenberg <
Post by Ethan Rosenberg
Dear List -
fprintf($fptr1,"\n\n"); //works
$string1 = "this is a test";
echo $string1; //works
fprintf($frpr1,"%s\n", $string1); //doesn't work
<snip>
while ($row1 = mysqli_fetch_row($result1))
{.
.
.
fprintf($fptr1, "%s\t %s\t %-9s\t %s\t\n", $row1[4] -$row1[3],
$row1[0],$row1[1],$row1[2] ); //works
}
fprintf($frpr1,"%s\n", $string1); //doesn't work
What am I doing wrong?
TIA
Ethan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
Regards,
Jigar Dhulla
Jim Giner
2014-08-14 13:15:56 UTC
Permalink
Post by Ethan Rosenberg
fprintf($fptr1, "%s\t %s\t %-9s\t %s\t\n", $row1[4] -$row1[3],
$row1[0],$row1[1],$row1[2] ); //works
}
fprintf($frpr1,"%s\n", $string1); //doesn't work
What am I doing wrong?
TIA
Ethan
Programming?

Could it be that you AREN'T USING PHP ERROR CHECKING AGAIN?!!! Because
if you were I think you would have been told what is wrong with this code.

Q#1 - What is $fptr1? Ans.- A handle I presume.
Q#2 = What is $frpr1? Ans.- ???
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Loading...