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?
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to