Help " Warning: Illegal string offset"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Help " Warning: Illegal string offset"

    Hello guys, i'm getting this error in PHP 5.4.* i've googled it seems the problem is to parse a string as an array, but with me that don't seem to be the case, i var_dumped it still can't figure it out please help, code is
    PHP Code:
    static $arr;
    if(
    is_array($var))
    {
        foreach(
    $var as $key=>$value)
        {
            
    $arr[$key]    = $var2->real_escape_string(htmlentities(trim($value)));//Problem line
            
    if(empty($arr[$key]))
                return 
    false;
        }

    libra.wen.ru

    #2
    From where did $var2-> came from? It shouldn't be there.
    <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

    Comment


      #3
      is $var2 value is defined as object

      Comment

      Working...
      X