Hello lallous,

Thursday, July 25, 2002, 3:40:32 PM, you wrote:

l> Hello,

l> Can I get the starting position of my string occurence when using any
l> regexps searching functions in PHP ?

l> for example:
l> $mem='this is a test';
l> preg_match('/test/', ...) should return me somehow: 10

l> Thanks

why regexps?
what about simple string fuctions in PHP?

for your example they will be more usefull:

strrpos - http://www.php.net/manual/en/function.strrpos.php


$text = "string";
echo strrpos($text, "r"); // must show 2 as result

Best regards,
Alexander Kuznetsov

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

Reply via email to