On Fri, May 7, 2010 at 8:56 AM, Maria McKinley <par...@u.washington.edu> wrote: > I was wondering if there is someway to limit the array that is > returned by ReadPage, do that it only pulls the content up to >>>div1end<<[[#blogend]]?
If you are trying to optimize the process of reading the file I would say it's not worthwhile -- the tiny gains you would see would be more than offset by the extra processing, I would think. If, on the other hand what you are looking for is to get the text of the page up to a particular string, then simply use a function like strpos()/substr() or explode() or preg_replace() or the like... $foo = ReadPage(...); if (($x = strpos($foo['text'], '>>div1end<<[[#blogend]]')) === FALSE) $MyText = $foo['text']; else $MyText = substr($foo['text'], 0, $x); or something like that. -Peter _______________________________________________ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users