1--TEST-- 2substr_replace() function - array 3--FILE-- 4<?php 5 6$arr = array('abc' => 'llsskdkk','def' => 'llsskjkkdd', 4 => 'hello', 42 => 'world'); 7$newarr = substr_replace($arr, 'zzz', 0, -2); 8 9print_r($newarr); 10 11?> 12--EXPECTF-- 13Array 14( 15 [abc] => zzzkk 16 [def] => zzzdd 17 [4] => zzzlo 18 [42] => zzzld 19) 20