Reply to Re: filehandle write to variable

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация