Extract a sentence out of sentences separated by delimitors
- by Laura
Below is a sample line I have extracted from a website:
below a satisfactory level; "an off year for tennis"; "his performance was off"
The output displays as:
below a satisfactory level; "an off year for tennis"; "his performance was off"
I want to get only the first sentence "below a satisfactory level";
Here is the code I have tried after exploring many stackoverflow posts:
$data=explode('; ',$str);
echo $data[0];
But somehow it is not working. Thanks in advance.