Quote:
Originally Posted by BaD CopY
Also how to replace first 2 characters with some new values ?
Values { 'ho', '+' }
so string "home" will be "+me"
|
PHP Code:
new const szGivenString = "home";
new const szReplaceString[ ][ ] =
{
{ "ho", "+" }
}
replace( szGivenString, charsmax( szGivenString ), szReplaceString[ 0 ][ 0 ], szReplaceString[ 0 ][ 1 ] );
__________________