php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #23986 Feature request: Positions of occurences of substrings
Submitted: 2003-06-03 09:42 UTC Modified: 2003-06-04 04:48 UTC
From: nigel dot pepper at certegy dot com Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.3.1 OS: Windows 2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nigel dot pepper at certegy dot com
New email:
PHP Version: OS:

 

 [2003-06-03 09:42 UTC] nigel dot pepper at certegy dot com
I've had to write my own function to do what I'd like but feel it would be a useful addition to the PHP set.

I needed to extract the positions of all occurences of a tag <pc> in a variable but was unable to find a suitable function.

I'm doing this in order to selectively apply the function ucfirst() to a variable's content.

Advice would be much appreciated if there is a function which will do this for me.

Cheers, Nigel :)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-04 04:48 UTC] mgf@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at 
http://www.php.net/downloads.php

Please look at the PREG_OFFSET_CAPTURE flag in preg_match_all() (http://www.php.net/preg-match-all), which was added in PHP 4.3.0.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Sep 12 02:01:26 2024 UTC