|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-07-24 10:37 UTC] baumann at valudo dot de
Hi there, I'm sad to tell you, that I think to have found an error in your documentation or in PHP (that's up to you guys :) When I was trying to find a pattern in a string with ereg, I did not get any result in $regs[1] as you wrote. I found it in $regs[0] where the copy of the whole string supposed to be. So I think that's a mistake, isn't it?? But anyway, good work folks, c ya... Tom PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 07:00:02 2025 UTC |
Try looking at a script like this: <? ereg("(.*)\.(.*)","25.67",$regs); for ($i=0;$i<count($regs);$i++){ echo "$i -- $regs[$i]<br>"; } ?> regs[0] will have "25.67" regs[1] will have "25" regs[2] will have "67" The documentation is correct.