I have the following string: "English,French,German". Replacing one element in this string is no problem, doing this:
@if (strpos($language,'English') !== false)<dd>{{{ $malestr = str_replace("English", "Eng.", $language)}}}</dd>@endif
Resulting in: "Eng.,French,German"
Now the problem is I want to replace all three elements and return only one string, but I don't know how to get to this. Can you help?
-- edit: thanks to Mahammad Alabed, found the solution in your link. This worked:
{{{$result = str_replace(
array('English', 'French', 'German'),
array('Eng.', 'Fr.', 'Ge.'),
$language
)}}}