<?php $params = ['first param ?', 'second param']; $query = 'my string ? other string ?'; $str = ''; foreach(explode('?', $query, count($params) + 1) as $token) { $str .= $token . array_shift($params); } echo $str;
You have javascript disabled. You will not be able to edit any code.