[Solved] want to convert a string into array [duplicate]


try this;

$answer = "8|$0-$100,000<>9|$3-$100,000<>10|$2-$100,000";

$answer = preg_replace("^[0-9]*\|^", "", $answer); // remove the number and |
$answer = str_replace("$", "", $answer); // remove $ sign 
$answer = explode("<>", $answer);

1

solved want to convert a string into array [duplicate]