im trying to call a function inside another function. based on some research they say using
$this->
should work. but it gave me
Fatal error: Using $this when not in object context
function addstring($input, $addition_string , $position) {
$output = substr_replace($input, $addition_string, $position, 0);
return $output;
}
function test($astring) {
$output2 = $this->addstring($astring, 'asd', 1);
}
to view the rest of my code :
error :
Fatal error: Using $this when not in object context in BLA.php on line 48