Search
Search Code
Warning: preg_match(): Compilation failed: invalid range in character class at offset 4 in simple_html_dom.php on line 722
Initial thought on this error is that there is a version issue. This only happened on version 1.11 for me, will check what other version i have. Yep not sure why but the older version of php ht..
php strip non numbers from string - remove all non-numeric characters from a string
this will remove all non alpha numeric numbers from a string. in this example it returns: 123456 from $1234.56x
convert characters to entities using javascript replace
takes a html string and replaces the html elements into their equivalent characters. e.g: replaces < with <
create a 200 character summary from a longer html string
this is a quick function that can create a 200 word plain text summary from a html string. Also added the option to specify the char length of the string. Function function create_summary($htm..
preg replace clean a string only allow a-zA-Z0-9 characters
allows only a-zA-Z0-9 and spaces
Cut a string when it finds a certain character with PHP
ok so lets say we have a string like this: Hi there im a string. I am also part of the same string. And we want to shorten the above string into just: Hi there im a string. This is what i wo..
