I have the following array that contains lots of “\/”, since the array is generated from a screen scrape of the javascript of a page “\/” is meant to be just “/”. Here’s the array:
Array (
[0] => 1 Jet Black
[1] => 1B\/350T Black With Copper Tips
[2] => 1B\/BGT Black With Burgandy Tips
[3] => 1b Natural Black
[4] => 2 Darkest Brown
[5] => 4 Chocolate Brown
[6] => 27 Strawberry Blonde
)
The best I can think of would be to:
$a = array("1B\/BGT Black With Burgandy Tips", "1B\/350T Black With Copper Tips");
foreach ($a as $key => $itsvalue) {
$a[$key] = strreplace("\\\/","\/",$itsvalue)
}
The code should be :-
Hope it helps.