<?php $String = "{{ONE}} {{TWO}} {{THREE}} {{FOUR}} {{FIVE}} {{SIX}}"; $rows = array(array('linkVal' => '{{TWO}}', 'link' => 'http://one.com'), array('linkVal' => '{{FOUR}}', 'link' => 'http://two.com') ); echo str_replace(array_column($rows, 'linkVal'), array_column($rows, 'link'), $String);
You have javascript disabled. You will not be able to edit any code.