I have this array returned by the db
Array ( [0] => Array ( [id] => 3 [test] => alphy,poxy,jade,auma ) )
Then i have used explode to separate the values
$options = explode(",", $test1['0']['test']);
the result is
array(4) { [0]=> string(5) "alphy" [1]=> string(4) "poxy" [2]=> string(4) "jade" [3]=> string(4) "auma" }
I then count the number of the values
$count= substr_count($test1['0']['test'], ",")+1;
I then now try to create textareas dynamically based on the count and values e.g text area 1 - alphy, textarea2 - poxy ...
for($i=0; $i<=$count;$i++){?>
<textarea ><?php echo $options[$i]['test']?> </textarea>
<?php }?>
The above is not doing, instead each textarea has just the first letter such as a, p, j, a instead of alphy , poxy, juma, auma.
What am i missing?