for example.
<html>
<head></head>
<body>
<div>
<h1>-----> hello! ----< </h1>
</div>
</body>
I want to replace the > and < inside the h1 tag with the corresponding > and <
which is the correct pattern?
thanks in advance!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could throw it at
tidy(see the docs) and see if it can fix the errors. A lot better than trying to do the "right thing" on your own with regex.It might be that you must enable tidy first in your PHP environment.