darkcarnival Posted November 26, 2006 Share Posted November 26, 2006 hello,I am working on a bulletin board program and I am trying to add a sub-board feature to it.now its hard when i have to make the template file use only one file so it isnt so hard.now i set everything up but i get this error:[quote]Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')'[/quote]now I have two pieces of code to present. here is the output code.[code]$category_vars = index_category();$board_vars = index_board($category_vars['CATEGORY_ID']);$page = new template($template_path ."/board-index.htm");$page->replace_tags(array( "BORDER" => "$border", "TABLE1" => "$table1", "TABLE2" => "$table2", "CAT_NAME" => "$category_vars[CATEGORY_NAME]", "LANG-BOARD" => "$index[boards]", "LANG-TOPIC" => "$index[topics]", "LANG-POST" => "$index[posts]", "LANG-LASTPOSTDATE" => "$index[lastposteddate]" "POST-ICON" => "$board_vars['BOARD_ICON']", "ID" => "$board_vars[BOARD_ID]", "BOARD" => "$board_vars[BOARD_NAME]", "DESCRIPTION" => "$board_vars[BOARD_DESCRIPTION]", "TOPIC-COUNT" => "$board_vars[BOARD_TOPICCOUNT]", "POST-COUNT" => "$board_vars[BOARD_POSTCOUNT]", "MODERATOR" => "$board_vars[BOARD_GROUP]", "SUBBOARD" => "$board_vars[BOARD_SUBBOARDS]", "DATE" => "$board_vars[BOARD_LASTUPDATE]", "LAST-POST" => "$board_vars[BOARD_POSTLINK]"));$page->output();[/code]now the functions basically just perform the loop actions. and then output them in an array, since some are long-ended, i'll just diaply ther arrays.[code]$category_vars .= array( "CATEGORY_NAME" => "$row[Name]", "CATEGORY_ID" => "$row[id]");[/code][code]$board_vars .= array( "BOARD_ID" => "$row[id]", "BOARD_ICON" => "$icon", "BOARD_NAME" => "$row[Name]", "BOARD_DESCRIPTION" => "$row[Description]", "BOARD_LASTUPDATE" => "$board_date", "BOARD_POSTLINK" => "$last_post_link", "BOARD_TOPICCOUNT" => "$topic_num", "BOARD_POSTCOUNT" => "$post_num", "BOARD_GROUP" => "$board_moderator", "BOARD_SUBBOARDS" => "$subboard_vars");[/code][code]$subboard_vars .= array( "SUBBOARD_NAME" => "$row[Name]", "SUBBOARD_ID" => "$row[id]");[/code]I really hope someone can help me as I am stuck on this.also please try to keep in mind im trying to get this to work on 1 template file for ease(plus its mess the last way i did it)if you need anymore information, please let me know.thanks :) Link to comment https://forums.phpfreaks.com/topic/28479-need-some-serious-help-with-an-array-error/ Share on other sites More sharing options...
darkcarnival Posted November 26, 2006 Author Share Posted November 26, 2006 nevermind, i figured it out. Link to comment https://forums.phpfreaks.com/topic/28479-need-some-serious-help-with-an-array-error/#findComment-130357 Share on other sites More sharing options...
Recommended Posts