In a variable, the value is:
1;2;3;4;5;6;
Those. Items are separated by a semicolon. I need these elements to be enrolled in the appropriate cell of the array. Who can help with the implementation?
$var = '1;2;3;4;5;6'; $row = explode(';', $var); echo "<pre>"; print_r($row); echo "</pre>";
explode
separator is transmitted first and not the variable ... - Zowieyou should be ashamed of such questions ..
even try to look for the answer in the net ..
http://www.php.net/manual/en/ref.strings.php - for working with strings
http://www.php.net/manual/en/ref.array.php - for working with arrays
Source: https://ru.stackoverflow.com/questions/42815/
All Articles