Reply to Re: treat large string like file

Your name:

Reply:


Posted by Mark on 11/24/06 05:33

petersprc wrote:
> To get the data two chars at a time, you could do:
>
> $len = strlen($data);
> for ($i = 0; $i < $len; $i += 2) {
> $str = substr($data, $i, 2);
> echo "String is \"$str\".\n";
> }
>
> To access using a streams interface, you could dump the data into a
> temporary file, then read it in. Or create a stream wrapper with
> stream_wrapper_register.

Well, the two characters at a time thing doesn't work very well,
because it's not always just two characters, and I've been doing a lot
of fseek-ing. The temp file solution could work, but that just sounds
like a horrible thing to do. Thanks anyway.

[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

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