I have a class with 4 vars and I want to print them separately as strings. (print each of them in different places).

this is apart of the class: (as you can see I use the \_\_tostring method to return only one of the vars but I want to use it for all of them.)

```
class dash
{
public $name;
public $msg;
public $msg_date;
public $votes;

function __construct($name,$msg,$msg_date,$votes){
$this->name=$name;
$this->msg=$msg;
$this->msg_date=$msg_date;
$this->votes=$votes;}

public function __toString(){
return $this->name;
}

```

I have to print it here:

```
function repliesView(){
$arr=objectsToArr();
$count=count($arr)-1;
for($i=0;$i<=$count;$count--){
echo "<p>name:$arr[$count]->name<br />"; 
echo "msg:$arr[$count]->msg<br />";
echo "date:arr[$count]->msg_date</p>";
}

```