I have array with login data, where I need to remove various, user defined strings, for example, my array looks like:
Array ( [0] => Date: 16/03/2015 20:39 [1] => IP Address: 93.136.99.89 [2]
What I want to do is remove "Date:" from first array element and "IP Address" from second array element.
Now I am using str_replace:
$lastlogindate = str_replace('Date:', 'Datum:', $lastlogin[0]);
But is there more elegant way of do this, and maybe, find defined occurance, and then wrapp it with tag, for every defined occurance in string in array element?