+1  A: 

You can try in 2 passes :

1 - replace $term[$i]['title'] by something like XXX$iXXX
2 - replace XXX$iXXX by <a ... title="$terms[$i]['pageBody'] ...
M42
thanks, that seems to work
TonyVipros