[ create a new paste ] login | about

Link: http://codepad.org/798J6kaL    [ raw code | output | fork ]

PHP, pasted on Feb 15:
1
2
3
4
5
6
7
8
9
<?php

$text = "hello world this is a string";
$text = substr_replace($text, '', 10, 1);
echo $text . "\n";

$text = "hello world this is a string";
$text = str_replace(substr($text, 9, 1), substr($text, 7, 1), $text);
echo $text . "\n";


Output:
1
2
hello worl this is a string
heooo worod this is a string


Create a new paste based on this one


Comments: