Hello everybody !

    if (empty($_GET['title'])) {

    if (!empty($_SERVER['SCRIPT_NAME'])) {

        $a = seo($_SERVER['SCRIPT_NAME']);
        $c = array("php","=","?","and","&","-",$val[1]);
        $b = array(""," "," "," "," ","","");
        $te = str_replace($c, $b, $a);

        if ($te == "index") {

            if ($settings['home_title'] != "" && $settings['url_ay'] != "" && $settings['home_subj'] != "") {
                $title = "".$settings['home_title']." ".$settings['url_ay']." ".$settings['home_subj']."";
            } else {
                $title = "".$lang[$te]."";
            }


        } else {

            $title = "".$settings['home_title']." ".$settings['url_ay']." ".$lang[$te]."";
            $header_title = "".$lang[$te]."";
            $keywords = $header_title;

        }

    } else {

        $title = '';
        $header_title = "";
        $keywords = "";
    }

I have this error Undefined offset: 1 in C:\xampp\htdocs\includes\head.php on line 61 . The line 61 is this :

$c = array("php","=","?","and","&","-",$val[1]);

Can you help me please ?

Thank you !

It says that $val[1] is invalid. Are you sure that $val is an array?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.