Simply need to replace terms that are in array :
<?php
$listarray = array('#TERM1#' => 'value term 1', '#TERM2' => 'value term 2');
$i=0;
foreach( $listarray as $handle ){
$i++;
$handle = str_replace($handle[$i][0], $handle[$i][1], $handle);
}
echo $handle;
?>
Would like to have : handle with #TERM1# = value term 1 and #TERM2# = value term 2
$handle
is a string, not an array, so what is$handle[$i][0]
supposed to be? – Barmar 7 hours ago