Re: PHP_OFFSET_CAPTURE
| From: | Jason Wong | Date: | Wed, 01 Oct 2003 11:33:11 +0000 |
| Subject: | Re: PHP_OFFSET_CAPTURE | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-164534@lists.php.net to get a copy of this message | ||
On Wednesday 01 October 2003 18:34, Joerg H. Baach wrote:
> <?
> $var= preg_match_all("|a(b)+|","abbabbabbaa",$hits, PREG_OFFSET_CAPTURE);
> print '$var: ';
> print_r($var);
> ?>
>
> I would asume that $var would be an array, containing the offsets of the
> found matches. Instead it is just a simple integer containing the number
> of matches. Pretty much looks like preg_match_all is not returning the
> right thing.
[snip]
> Is it just me, or is it a bug?
Probably you! RTFM again.
print_r($hits);
--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
I wonder if I ought to tell them about my PREVIOUS LIFE as a COMPLETE
STRANGER?
*/