PHP regular expressions
Posted 31 August 2006 - 03:46 PM
My aim is to get rid of html tags from a var.
$var = "<div align=center>hell</div>";
i found out that you could use regular expressions but dont know how to use them.
I found <([A-Z][A-Z0-9]*)\b[^>]*>(.*?)</\1> which should work (probably).
How do i use it exactly in preg_replace or anything else?
Posted 31 August 2006 - 04:04 PM
<?php $var = strip_tags('<div align="center">hell</div>'); ?>
Posted 31 August 2006 - 04:25 PM
$var could be..
Posted 31 August 2006 - 04:30 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users