Accessing array declared inside a class via object of that class
I have created a class named as MEMBERS. In this class I have declared an array as a member variable. 

    class member
    {
    public $arr_connections;
    function connections($id)
	{
		$query = mysql_query("Select * from connections where user_id = '$id'");
		while($info = mysql_fetch_array($query))
		{
			$arr_connections[] = $info['connection_id'];
		}
		
	}
    }
 Then I have created an object of this class as follow
   
     $user = new member();
After this I am calling the function as


    $user->connections($user->id);
Next I am displaying the array
   

 
    foreach($user->arr_connections as $mem_id)
    {
				echo $mem_id;
				$person = new member($mem_id);
				echo "<a href = 'profile.php?id=$person->id'><img src = '$person->display_picture'/ width = 30 height = 30></a>";
    }

This is not working. I guess my method is wrong. Some constructor was required. But I have to do this without constructor. 
Any suggestions?
Accessing array declared inside a class via object of that class
===

I have created a class named as MEMBERS. In this class I have declared an array as a member variable. 

    class member
    {
    public $arr_connections;
    function connections($id)
	{
		$query = mysql_query("Select * from connections where user_id = '$id'");
		while($info = mysql_fetch_array($query))
		{
			$arr_connections[] = $info['connection_id'];
		}
		
	}
    }
 Then I have created an object of this class as follow
   
     $user = new member();
After this I am calling the function as


    $user->connections($user->id);
Next I am displaying the array
   

 
    foreach($user->arr_connections as $mem_id)
    {
				echo $mem_id;
				$person = new member($mem_id);
				echo "<a href = 'profile.php?id=$person->id'><img src = '$person->display_picture'/ width = 30 height = 30></a>";
    }

This is not working. I guess my method is wrong. Some constructor was required. But I have to do this without constructor. 
Any suggestions?