1

I am getting the notice:

Notice: Array to string conversion in E:\XAMP\htdocs\1\plugins\content\cedtag\cedtag.php on line 148 Notice: Array to string conversion in E:\XAMP\htdocs\1\plugins\content\cedtag\cedtag.php on line 141

This is the part of the code where I'm getting the error:

if ($position == 1) {
        $text = $htmlTag[0] . $text;
    } else {
        if ($position == 2) {
            // Both before and after Text
            $text = $htmlTag[0] . $text . $htmlTag[0];
        } else {
            // After Text
            $text .= $htmlTag[0];
        }
    }

How can I resolve it?

Rasclatt
  • 12,498
  • 3
  • 25
  • 33
afshar saeed
  • 23
  • 1
  • 5

1 Answers1

2

Try print_r() or var_dump() on your variables. One of them is an Array and PHP can't convert an Array into a string.

иikolai
  • 175
  • 1
  • 8