Dynamic regex trouble?

I’m trying to make an dynamic regex script but am having some trouble. To make this work I need to get data out of my DB in a string. In my dbTable I have 2 rows (from,to).

In these 2 columns I have this:
<div id=\“contentcenter\”> and </div>

Now when I retrieve these values from my db I get them as html?

$sql = mysql_query("SELECT * FROM test LIMIT 1");
while($row = mysql_fetch_assoc($sql)){
        $regfrom= $row['from'];
	$regto= $row['to'];
}

$content = get_string_between($text, $regfrom, $regto)

;

If I echo $regfrom and $regto I just get empty… How do I get the raw data?

Thanks in advance :slight_smile:

$sql = mysql_query("SELECT * FROM test LIMIT 1");
while($row = mysql_fetch_assoc($sql)){

    print_r($row); //what do you get? If nothing, check your sql query...

    //$regfrom= $row['from'];
    //$regto= $row['to'];
}

//$content = get_string_between($text, $regfrom, $regto)

;