I have a string
1b00bd515bf8cbc5a86f3b714361fab6
and I want to break it down like this:
1b00bd51-5bf8cbc5-a86f3b71-4361fab6
How can I do this?
I have a string
1b00bd515bf8cbc5a86f3b714361fab6
and I want to break it down like this:
1b00bd51-5bf8cbc5-a86f3b71-4361fab6
How can I do this?
use chunk_split function split a string into smaller chunks
below:
$str = "1b00bd515bf8cbc5a86f3b714361fab6";
$str = trim(chunk_split(str_replace('-','',$str), 8, '-'), '-');