Of course you're only getting Array as output.. you're attempting to convert an array to a string without the applicable function for doing so.
If you want to print the full array, as a string, try print_r($array);.
Further, you can of course join the array together using a string, using implode().. and last but not least, be sure to access the individual pieces of the array, should you want them, with their keys:
echo $_SESSION['subject']['somekeyhere'];
However, it would also appear that from your code, you actually have a few typos that would prevent you from getting the data you need: $calname versus the $colname variable you have in your while loop.. leaves it as an empty array in your session.
UPDATE 1:
Another way to print the entire array.. or rather, echo out each individual value:
foreach ($array as $key => $value) {
echo $value . "<br />";
}
Off topic:
I would not recommend using mysql_* functions to write new code. They are no longer maintained and the community has begun deprecation process. See the red box? Instead you should learn about prepared statements and use either PDO or MySQLi. If you can't decide which, this article will help you. If you pick PDO, here is good tutorial. Also see Why shouldn't I use mysql functions in PHP?
Example of your above code using PDO instead(with typos fixed as well):
try {
$dbh = new PDO("mysql:host=localhost;dbname=cse", "root", "");
$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch (PDOException $e) {
echo "Error! Could not connect to database: " . $e->getMessage() . "<br/>";
die();
}
$stmt = $dbh->prepare("select * from studenttable where username=:username");
$stmt->bindValue(":username","saravanan");
$stmt->execute();
$calname = array();
$i = 0;
while ($rs = $stmt->fetch()) {
$calname[$i]=$rs['name'];
$i++;
}
$_SESSION['subject']=$calname;