How to break and wrap the text in li tags in php?

Good afternoon.
There is a line separated by semicolons: some text here; more text here
Like in php you can split and put these pieces of string in the tag , that would have been design like the following:
<p>some text here</li>
<p>more text here</li>


Please tell me.
Thank you!
April 3rd 20 at 17:39
3 answers
April 3rd 20 at 17:41
Solution
okey, a semicolon I will replace, and how to wrap fragments of the strings in the tags? - kari_Kle commented on April 3rd 20 at 17:44
The number of fragments of rows may be different. - kari_Kle commented on April 3rd 20 at 17:47
explode() helped. Fell asleep in a cycle results and brought. Thank you. - kari_Kle commented on April 3rd 20 at 17:50
April 3rd 20 at 17:43
Solution
maybe someone will need something like this:
$a = explode(';', $datas);
$countA = count($a);
for ($i=0; $i < $countA; $i++ )
{
echo "'<li>'.$a.'</li>'";
}
April 3rd 20 at 17:45
$str = "<ul><li>" . str_replace(";", "</li><li>", $str) . "</li></ul>";

Find more questions by tags PHPRegular expressions