can i send function output data to mail?
i have 2 funciton and i want to send all functions data to my mail
i tryed like this 
these r my functions
funciton cart1();
function cart2();
my function codes
<?php
function cart1  () {
	foreach($_SESSION as $name => $value){
		if ($value>0) {
			if (substr($name, 0, 5)=='cart_') {
				$id = substr($name, 5, (strlen($name)-5));
				$get = mysql_query('SELECT id, name, price FROM products WHERE id='.mysql_real_escape_string((int)$id));
				while ($get_row = mysql_fetch_assoc($get)) {
					$sub = $get_row['price']*$value;
					echo $get_row['name'].' x '.$value.' @ &pound;'.number_format($get_row['price'], 2).' = &pound;'.number_format($sub, 2).'<a href="cart.php?remove='.$id.'">[-]</a> <a href="cart.php?add='.$id.'">[+]</a> <a href="cart.php?delete='.$id.'">[Delete]</a><br />';
				}
			}
			
		}
	}
}
?>

<form action="email.php" method="post">
<input type="hidden" name="cart1" value="<?php cart1 (); ?>">
<input type="hidden" name="cart2" value="<?php cart2 (); ?>">
<input type="submit" name="submit" value="Submit" >
</form>

i just wnat to know how to convert function's output into form object. can any 1 help me.
can i send function output data to mail?
===

i have 2 funciton and i want to send all functions data to my mail
i tryed like this 
these r my functions
funciton cart1();
function cart2();
my function codes
<?php
function cart1  () {
	foreach($_SESSION as $name => $value){
		if ($value>0) {
			if (substr($name, 0, 5)=='cart_') {
				$id = substr($name, 5, (strlen($name)-5));
				$get = mysql_query('SELECT id, name, price FROM products WHERE id='.mysql_real_escape_string((int)$id));
				while ($get_row = mysql_fetch_assoc($get)) {
					$sub = $get_row['price']*$value;
					echo $get_row['name'].' x '.$value.' @ &pound;'.number_format($get_row['price'], 2).' = &pound;'.number_format($sub, 2).'<a href="cart.php?remove='.$id.'">[-]</a> <a href="cart.php?add='.$id.'">[+]</a> <a href="cart.php?delete='.$id.'">[Delete]</a><br />';
				}
			}
			
		}
	}
}
?>

<form action="email.php" method="post">
<input type="hidden" name="cart1" value="<?php cart1 (); ?>">
<input type="hidden" name="cart2" value="<?php cart2 (); ?>">
<input type="submit" name="submit" value="Submit" >
</form>

i just wnat to know how to convert function's output into form object. can any 1 help me.