Parsing input string

The value of the variable is:


I.e. elements are separated by semicolons. I need these elements to be written to the corresponding array cell. Who can help with the implementation?

Answer 1, authority 100%

You should be ashamed of yourself for asking such questions..

at least try to look for the answer on the net..– for working with strings– for working with arrays

Answer 2, authority 33%

$var = '1;2;3;4;5;6';
$row = explode(';', $var);
echo "<pre>";
echo "</pre>";