[PHP] PHP_OFFSET_CAPTURE

2003-10-01 Thread Joerg H. Baach
Hi, I have this litte tiny test-script test.php: ? $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

Re: [PHP] PHP_OFFSET_CAPTURE

2003-10-01 Thread Marek Kilimajer
Documentation is little unclear about this, by return means the third argument. Try print_r($hits); Joerg H. Baach wrote: Hi, I have this litte tiny test-script test.php: ? $var= preg_match_all(|a(b)+|,abbabbabbaa,$hits, PREG_OFFSET_CAPTURE); print '$var: '; print_r($var); ? I would asume

Re: [PHP] PHP_OFFSET_CAPTURE

2003-10-01 Thread Jason Wong
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