PHP Script, Find and Replace

Completed Posted 7 years ago Paid on delivery
Completed Paid on delivery

I need a PHP function that will find all heading tags in and give them a unique id.

For example:

<h1>Some Heading</h1> BECOMES <h1 id="item1">Some Heading</h1>

<h3 class="big">Another Heading</h3> BECOMES <h3 class="big" id="item2">Another Two</h3>

I need it to work for all headings levels, regardless of any attributes they already have (class, styles, etc).

Do not use deprecated code. Create your own sample content.

Thanks

PHP

Project ID: #12306976

About the project

3 proposals Remote project Active 7 years ago

Awarded to:

Nawaz091993

Greetings! I am a highly skilled PHP programmer and can do this task within minutes. Ready to start right away!

$22 USD in 0 days
(110 Reviews)
6.6

3 freelancers are bidding on average $27 for this job

sureshdevi

I can create my own code to replace the header tags with custom class. I will complete this work in a day. Looking for your reply to start this work immediately. I will be available online from 2 am GMT to 5 pm GMT More

$29 USD in 1 day
(1157 Reviews)
8.0