LMSouq
php-dev Open

Split string by new line characters

JO
Johan
1 month ago
3 views
Problem Description
I have a string with new line characters. I want to convert that string into an array, and for every new line, jump one index place in the array. If the string is: ``` My text1 My text2 My text3 ``` The result I want is this: Array ( [0] => My text1 [1] => My text2 [2] => My text3 )

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base