if i have two arrays i.e
$text = 'i am passed :)';
$fn = array(
':)',
':-)',
';;)'
)
$rep = array(
'smily1',
'smily2',
'smily3'
);
$output = str_replace($fn, $rep, $text);
echo $output;
i want to make a class for this to use in future where i will want…
how can i make a class for it…
and also how can i create a function for this…
Basically by wrapping your function in a class. If you’re looking for more advanced functionality then that, you’ll have to specify.