How to crop the result?

Hello. Help how to crop the result when a field of this type?
title|Name text||text|Text text...

How do I get the title, namely the title of the text.
April 7th 20 at 15:22
1 answer
April 7th 20 at 15:24
$str = 'title|Title text||text|Text text...';

echo explode('|', str_replace('||', '|', $str))[1];

Find more questions by tags PHP