I'm trying to remove all hyphens from my string when it is returned.
$hash = $result[2];
Return me:
0DE8072B-C3BE-4A94-B412-3679F7C79913
I want to define a variable that removes all hyphens from the variable $hash
I'm trying to remove all hyphens from my string when it is returned.
$hash = $result[2];
Return me:
0DE8072B-C3BE-4A94-B412-3679F7C79913
I want to define a variable that removes all hyphens from the variable $hash
You can use str_replace
in this case, replacing the hyphen with an empty string, like this:
$hash = str_replace("-", "", $result[2]);
Use str_replace ()
$new_var = str_replace("-", "alguma coisa", $hash);