The schema of the OP represents an array of objects (see here), each bearing a text property. With respect to the first question, I suggest using array_map(), as follows:
<?php
// create array of objects
$arr = [];
$tx = ["ans1","ans2","ans3"];
for ($i = 0, $max = 3; $i < $max; $i++) {
$arr[] = new stdClass;
$arr[$i]->text = $tx[$i];
}
//***** First Answer *******
$nu = array_map( function($e)
{
return $e->text;
}, $arr);
//***** Second Answer *******
$str = join(",",$nu);
// ***** Output *********
print_r( $nu );
print_r( $str );
See demo
array_map() does speedy, behind-the-scenes iteration as it applies an anonymous function, to each element of $arr. It returns a new array where each element contains the value of the text property of each stdClass object. While another respondent has suggested using array_column() which one may apply to a multidimensional array or an array of objects, unfortunately, it fails to handle an array of objects in PHP 5 (see here) unlike the capable array_map().
In answer to the second question, one may use join() to concatenate the $nu array values with a comma, as the example illustrates.