Write a PHP program to insert a given string into middle of the another given string of length 4
<?php function test($s1, $word) { return substr($s1, 0, 2) . $word . substr($s1, 2); } echo test("[[]]","Hello")."\n"; echo test("(())", "Hi");
Sample Output:
[[Hello]] ((Hi))
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer