I've been trying to solve this for three days now but no success and it's getting stressing. It's for Wordpress plugin. I hope you guy out there can help me out and explain to me what is wrong with the code. The code is to look for [DATA:<- ID OF THE DATA IN MYSQL ->] on the content page and replace it with the ID's title which was extracted from MYSQL. eg: [DATA:2] = < b >This is info for ID 2 < /b > Everything work perfectly until i added the codes with the Asterik '*'... and all I get is blank. No result, nothing... not even the [Data:2] tag. Please help. =============== function scannow ($content) { $CODE = '/\[DATA\:(.*?)\]/is'; $VALUE = '$1'; * $result = mysql_query("SELECT * FROM wp_datastructure WHERE option_id = '$VALUE'"); * $row = mysql_fetch_array($result); * $VALUE = $row['option_name']; $content = preg_replace($CODE, $VALUE, $content); return $content; } =============== note: I've tried using the tips in Wordpress Codex but all give me nothing but errors. pls help!