Copyright © tutorialspoint.com
Syntax
Definition and UsageUsed to find the offset or position of the last matched substring. If SCALAR is specified, it will return the offset of the last match on that scalar variable. You can also assign a value to this function (for example, pos($foo) = 20;) in order to change the starting point of the next match operation. Offset is counter starting from zeroth position. Return Value
ExampleTry out following example:
It will produce following results:
|
Copyright © tutorialspoint.com