Q:

Error when trying to get output in txt file Notice: Trying to get property of non-object in C:\xampp\htdocs\

Trying to pull up the contents of news details from one news website and to get the output in text file but getting error "Notice: Trying to get property of non-object in C:\xampp\htdocs\folder4\test3.php on line 8".But the contents of news what i want to extract can shown up on browser, problem is that not able to extract output the contents in text file.
Please help me out somobody what wrong in this code(on line 8)
1 <?php
2 include_once("simple_html_dom.php");
3 $html = file_get_html("http://www.newzx.com");
4 $content1= $html->find("div.mid-col div.news-box", 0);
5 $content2= $html->find("div.mid-col div.news-box", 1);
6 $con=$content1.$content2;
7 echo = $con;
8 file_put_contents(dirname(__FILE__) . "/txt1111.txt", $con->plaintext);
9 ?>

A:

pretty obvious
$con=$content1.$content2;

this implies $con is a string, witch is not an object.

