Try this
$result = substr(strstr($base64image, ','), 1);
Question
$base64image = "data:image/png;base64,iVBOR(...)5CYII=";
I need to cut off the first part of the string and stop when the comma is cut off, so only "iVBOR(...)5CYII=" remains, since I'm using a function that doesn't support the current format using the "data:image/;base64," at the beginning, I need it to be always cut off the string.
PS: The length of the string before the commas can differ :/
How could I achieve this?
Solution
Try this
$result = substr(strstr($base64image, ','), 1);