Jump to content

unexpected T_ECHO, expecting ',' or ';' Error help


slayer__

Recommended Posts

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
Share on other sites

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
Share on other sites

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.