Php Add String Inside String At Position

[Solved] Php Add String Inside String At Position | Php - Code Explorer | yomemimo.com
Question : php add string inside string at position

Answered by : wandering-warbler-02dkqzhbsxuf

<?php
$string = 'I am happy today.';
$replacement = 'very ';
echo substr_replace($string, $replacement, 4, 0); // I am very happy today.

Source : https://coderwall.com/p/c6ifsw/simple-way-to-insert-a-string-into-another-string-at-any-position-in-php | Last Update : Fri, 15 Oct 21

Answers related to php add string inside string at position

Code Explorer Popular Question For Php