Let's say I have a huge variable called $file
$file contains thousands of lines of html, css, javascript and more.
But, I want to be able to find all of these link and edit them.
I want to only edit the ones that don't have a domain name.
Example: I would edit this link: /folder/folder/file.css
I would change it to: http://www.domain.com/folder/folder/file.css
Is there a way I can do this with php automatically?
Joe34
0
Junior Poster in Training
Recommended Answers
Jump to PostHave a look at str_ireplace and preg_replace. It's all in the manual!
All 4 Replies
chrishea
182
Nearly a Posting Virtuoso
Joe34
0
Junior Poster in Training
DJWK
0
Newbie Poster
Joe34
0
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.