|
Posted by Erwin Moller on 06/22/07 09:36
onlineviewer wrote:
> Hello All,
>
> Can someone help me out with how to go about printing to a variable
> rather than to a file using filehandles. Below i have it in perl, how
> do i
> get this going in php. Thanks in advance...
>
> $string = '' ";
> open $writeto, '>>', \$string;
>
> foreach my $file(@array){
> print $writeto $file;
> }
Hi,
What is 'printing to a variable' ?
Putting content into a variable?
If so, that is simple:
$myVar = "Hello World";
// and add more:
$myVar .= "\nNext line\n\nBye!";
If that doesn't help, please be more clearly about what it is you need.
Regards,
Erwin Moller
Navigation:
[Reply to this message]
|