User Profile
Collapse
-
I Tried Many Combination To Do That But Failed To Write It In A Correct Way , Can You Rewrite it ?... -
-
No No
i don't wanna do it in this way , I Did what I Wanted Btw by this :
add this line :
[PHP]$html = preg_replace( '|([a-z]=)([0-9]+)|', '$1"$2"', $html );[/PHP]
but i still have a problem in this :
[PHP]$html = preg_replace( array('/<(br)>/', '/<(hr\s?.*?)>/','/<(img\s?.*?)>/'), '<\\1 />', stripslashes(st ripslashes($htm l)) );[/PHP]
...Leave a comment:
-
Regular Expression Tags To Lower & Adding quotes
Hello I'm Using The Following Code To Do 2 things
1-Convert Tags To Lower Case
2-Add Quotes To Attributes That Doesn't Have Quote but i'm having problems with some attributes.
The Functions I'm using :
[PHP]// convert tags to lowercase
$html = preg_replace( "/(<\/?)(\w+)([^>]*>)/e", "'\\1'.strtolow er('\\2').'\\3' ", $html);
// close br, hr and img tags
$html...
No activity results to display
Show More
Leave a comment: