[pmwiki-users] using ReadPage (was "rss feed marked up to html")
pbowers at pobox.com
Fri May 7 06:29:42 CDT 2010
On Fri, May 7, 2010 at 8:56 AM, Maria McKinley <parody at 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
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'];
$MyText = substr($foo['text'], 0, $x);
or something like that.
More information about the pmwiki-users