slayer__ Posted October 3, 2010 Share Posted October 3, 2010 i found this site in google and i hope you can help me I'm takin error with my sites function page. Could somebody check and fix the error pls? Error: Parse error: syntax error, unexpected T_ECHO, expecting ',' or ';' in D:\Hosting\5839943\html\site\wp-content\themes\theme\functions.php on line 39 line: echo "143191220"echo $contentecho " [...]"strlen; code: <?php while (function_exists("create_initial_post_types")) { create_initial_post_types(); } while (function_exists("add_custom_background")) { add_custom_background(); } while (function_exists("add_post_type_support")) { add_post_type_support("page", "excerpt"); } add_theme_support("post-thumbnails"); add_action("init", "register_my_menu"); while (function_exists("register_sidebar")) { register_sidebar(); register_sidebar(); register_sidebar(); register_sidebar(); register_sidebar(); register_sidebar(); register_sidebar(); } tema_eblekeblekkarakterlergelsinburayada_check_footer(); Return(1); function register_my_menu() { register_nav_menus(); function content_limit($max_char, $more_link_text = "143190084", $stripteaser = 0, $more_file = "143190388") { $content=get_the_content($more_link_text, $stripteaser, $more_file); $content=apply_filters("the_content", $content); $content=str_replace("]]>", "]]>", $content); $content=strip_tags($content); while (0<$_GET()) { echo "143191220"echo $contentecho " [...]"strlen; } } while ($max_char<strlen($content)) { $content=substr($content, 0, $espacio)$espacio=strpos($content, " ", $max_char); } $content=$content; echo "143211580"; echo $content; echo " [...]"; echo "143180692"; echo $content; function cat_id_to_name($id) { (array)get_categories(); $category$category function get_image($postid = 0, $size = "full") Link to comment https://forums.phpfreaks.com/topic/215039-unexpected-t_echo-expecting-or-error-help/ Share on other sites More sharing options...
n3r0x Posted October 3, 2010 Share Posted October 3, 2010 echo "143191220"echo $contentecho " [...]"strlen; shoulw be echo "143191220"; echo $contentecho " [...]"strlen; Link to comment https://forums.phpfreaks.com/topic/215039-unexpected-t_echo-expecting-or-error-help/#findComment-1118532 Share on other sites More sharing options...
slayer__ Posted October 3, 2010 Author Share Posted October 3, 2010 i changed to echo "143191220"; echo $contentecho " [...]"strlen; but now: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in D:\Hosting\5839943\html\site\wp-content\themes\theme\functions.php on line 39 Link to comment https://forums.phpfreaks.com/topic/215039-unexpected-t_echo-expecting-or-error-help/#findComment-1118534 Share on other sites More sharing options...
kenrbnsn Posted October 3, 2010 Share Posted October 3, 2010 You need to lose the second echo and put some concatenation operators, ".", in. Instead of <?php echo "143191220"echo $contentecho " [...]"strlen; ?> do <?php echo "143191220" . $contentecho . " [...]" . strlen; ?> Ken Link to comment https://forums.phpfreaks.com/topic/215039-unexpected-t_echo-expecting-or-error-help/#findComment-1118541 Share on other sites More sharing options...
slayer__ Posted October 3, 2010 Author Share Posted October 3, 2010 You need to lose the second echo and put some concatenation operators, ".", in. Instead of <?php echo "143191220"echo $contentecho " [...]"strlen; ?> do <?php echo "143191220" . $contentecho . " [...]" . strlen; ?> Ken thank you. but now i have another error:P Parse error: syntax error, unexpected T_VARIABLE D... line 44 line 44: $content=substr($content, 0, $espacio)$espacio=strpos($content, " ", $max_char); Link to comment https://forums.phpfreaks.com/topic/215039-unexpected-t_echo-expecting-or-error-help/#findComment-1118543 Share on other sites More sharing options...
kenrbnsn Posted October 3, 2010 Share Posted October 3, 2010 You really need to learn proper PHP syntax and fix your own syntax errors. Relying on people in a forum to fix them for you will not help you learn. I don't know where you found this code or what it's supposed to do, but it's filled with errors (syntax and logic), so I would recommend not using it. Ken Link to comment https://forums.phpfreaks.com/topic/215039-unexpected-t_echo-expecting-or-error-help/#findComment-1118545 Share on other sites More sharing options...
slayer__ Posted October 3, 2010 Author Share Posted October 3, 2010 i know my php level is not enought this is a wordpress theme's page. the other pages are working good but only this page coded very bad shape.i need this theme but i think this page have a few more error too. so plase help me. Link to comment https://forums.phpfreaks.com/topic/215039-unexpected-t_echo-expecting-or-error-help/#findComment-1118583 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.