Find Jobs
Hire Freelancers

PHP function to replace a HTML node

$10-30 USD

Closed
Posted over 7 years ago

$10-30 USD

Paid on delivery
This is a second attempt at posting this project. We would like someone to create a php function that simply replaces a node within a HTML document. We plan to loop a large number of HTML documents. Inside the document is a node that we wish to replace. The function should accept three parameters: 1) The original HTML 2) A string representing the opening tag of the node 3) A string representing the new node The function should return the original HTML with the relevant node replaced. The solution should use the DomDocument class unless there's a good reason suggested not to. The solution should be generic and be able to handle any HTML, but as an example, this is what we are trying to achieve: $sHaystack = "<html><div id='apple'><div id='pear'></div></div></html>"; $sNeedle = "<div id='pear>"; $sReplacementHTML = "Hello World" $result = replaceHTMLInTag($sHaystack,$sNeedle,$sReplacementHTML) echo $result; Result is: <html><div id='apple'>Hello World</div></html>
Project ID: 11637197

About the project

20 proposals
Remote project
Active 7 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
20 freelancers are bidding on average $34 USD for this job
User Avatar
Hi there! Did go through your Job Description and glad to share that I have experience in working with wordpress platform. I have more than four years of industry experience and have been the part of diverse industry verticals. I also have expertise with Magento,WordPress, PHP, PHP Scripting and CodeIgnitor along with Photoshop. So can help you with the design as well. Looking forward to your response.
$25 USD in 1 day
5.0 (299 reviews)
7.5
7.5
User Avatar
Hello, I'm ready to assist. I have a question: Since the function name is replaceHTMLInTag, I think the $sNeedle should be <div id='apple'> So any html inside this tag will be replaced. Is there any particular reason? Please PM me for the answer. Best regards.
$30 USD in 3 days
5.0 (150 reviews)
6.7
6.7
User Avatar
yes, let's clarify the requirement in details also if you want us to share our skill and previous work let us know.. hope to hear you soon.. Thanks & Regards RIMSHA
$138 USD in 3 days
4.7 (180 reviews)
7.2
7.2
User Avatar
Dear Hiring Manager, Thank you for this wonderful opportunity. I have excellent experience in Website Development & designing. I can finish this job within the given time frame as i can easily do it. I have 4+ years of experience as a Web developer and designer.
$19 USD in 1 day
5.0 (95 reviews)
6.6
6.6
User Avatar
hello...we are expert...done like similar..can do it...come on chat...waiting....thanks
$20 USD in 0 day
4.7 (44 reviews)
5.5
5.5
User Avatar
Hi, I am interested in your project " PHP function to replace a HTML node ". We will make a changes in your php function. Let's discuss more about the project and turn it into reality with your idea and our skills. We work on Website development, Mobile application development, Website design, APP design, UX/UI design few name are here. We have great skills in PHP, Angular JS,Node JS, Laravel, Android, IOS,Graphics design, Codeigniter, Wordpress, Magento, Joomla, HTML/CSS, Database query, AJAX, Jquery. We are immediately start work on your project. We hope you will provide us this great opportunity to serve you. We are waiting for your response. Regards, Ravi.
$30 USD in 1 day
5.0 (6 reviews)
5.2
5.2
User Avatar
Dear Hiring Manager ! Before Awarding To Any Freelancer give me chance & Kindly Discuss your project with me. I have carefully read your requirement and got complete understanding of the project. I have more than 8 years of experience in Website Design & Development . I have expertise in PHP,JOOMLA,HTML,HTML5,CSS, Ajax ,jquesry ,JavaScript ,Mysql ,Graphic Design ,Website Design, Android, Mobile Application,Photoshop, Banner Design ,Flayer Mail ,Logo Design, joomla ,wordpress , magento , CI. I am always available on Email and Skype. Please have a voice or video chat if necessary. I will be available more than 40 hours per week and able to start your project as soon as possible according to you. Thank you for taking the time to read my application. I look forward to talking with you. Regards: Nikhil Singh
$35 USD in 0 day
4.7 (50 reviews)
5.2
5.2
User Avatar
hi, Ready to start right now. I have experience in JavaScript, HTML, PHP and Java. Can provide quality and standard work. Please pm me for more details. Thank You
$30 USD in 1 day
4.8 (24 reviews)
4.5
4.5
User Avatar
Hello there It is my great honor to apply for this vacant job. I am very hardworking and can work effectively as fast as I can. I have excellent skills in JAVA, C++, C#, OPPs, HTML5, CSS3, JS, AJAX, JQYERY, React.js, ANGULAR.JS, BACKBONE.JS, BOOTSTRAP, PHP,Wordpress, ASP.NET, MVC, Web Research and Microsoft Office and I have enough experience with different kinds of tasks as you can see in my "Work History", most of the time I gave my clients a great results.I have fast internet connection at home, have my own pc to use anytime and have own space to work. I can work fulltime and will focus to this project. I can follow instructions very well and will deliver the project on time. It is a pleasure if ever you will message me for an interview. I can work as soon as possible. Thanks and more power. MOHSAN IJAZ
$25 USD in 1 day
5.0 (17 reviews)
4.1
4.1
User Avatar
hello friend good day I can help you with your problem'm an expert in web pages and php realizaria the time necessary for you, I would love to help greetings
$30 USD in 1 day
5.0 (16 reviews)
3.9
3.9
User Avatar
I've 5+ years of experience in PHP,MYSQL and all relevant CMS and framework in PHP. I can make this script using regular expression and str_replace function in php. And yes you can use it in any php project. I'm already trying to make the functions. Do you have any other test cases? If so then please send to me so that I can test it properly and can give to you. I'm looking forward to you. Thanks! TS
$25 USD in 1 day
5.0 (3 reviews)
2.0
2.0

About the client

Flag of UNITED KINGDOM
Solihull, United Kingdom
4.9
31
Payment method verified
Member since Sep 26, 2012

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.