eregi function?
| From: | Jas | Date: | Tue, 25 Nov 2003 22:32:06 +0000 |
| Subject: | eregi function? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-170952@lists.php.net to get a copy of this message | ||
Not sure how to do this but I have a call to a database which pulls the contents of a table into an array and I need a eregi string which will sift through the contents and put a line break (i.e. \n or <br>) after each ";", "}" or "{". here is what I have so far...
while($b = mysql_fetch_array($sql)) {
list($id,$date,$user,$level,$global,$vlan01,$hosts01,$vlan02,$hosts02,$vlan03,$hosts03,$vlan04,$hosts04,$vlan05,$hosts05,$vlan06,$hosts06,$vlan07,$hosts07,$vlan08,$hosts08,$vlan09,$hosts09,$vlan10,$hosts10) = $b; }
if(!eregi("^[{]+[}]+[;]$", $id,$date,$user,$level,$global,$vlan01,$hosts01,$vlan02,$hosts02,$vlan03,$hosts03,$vlan04,$hosts04,$vlan05,$hosts05,$vlan06,$hosts06,$vlan07,$hosts07,$vlan08,$hosts08,$vlan09,$hosts09,$vlan10,$hosts10))
// insert line break here
}
Any help with this would be appreciated
Jas