it still doesn't work.. this is my code:
$search = array ( '/\{OPTIONS_OBJ_(\d*)\}/Ui',
'/\{OPTIONS_TEXT_(\d*)\}/Ui',
'/\{OPTIONS_POINTS_(\d*)\}/Ui',
'/\{MENU_OBJ\}/Ui',
'/\{MENU\}/Ui',
'/\{QUESTION_NO\}/Ui',
'/\{QUESTION_TEXT\}/Ui',
'/\{TEST_ID\}/Ui',
'/\{TEST_NAME\}/Ui',
'/\{TEST_DESCRIPTION\}/Ui',
'/\{TEST_STATUS\}/Ui',
'/\{TEST_FILENAME\}/Ui'
);
$replace = array ( $options["obj"][(int) ${1}],
$options["text"][(int) ${1}],
$options["points"][(int) ${1}],
$options["menu_objname"],
$options["menu"],
$qn,
$question["title"],
$test_data["id"],
$test_data["title"],
$test_data["description"],
$test_data["status"],
$test_data["filename"]
);
$question_html .= preg_replace($search,$replace,$question["design"]);
It seems the (int) ${1} reference doesn't work in search/replace arrays.