There is a $_POST['name_firstname']
. It is necessary on the space to break into two variables $name
and $first_name
|
3 answers
list($name, $first_name)= explode(" ", $_POST['name_firstname');
|
$expd = explode(' ', $_POST['name_firstname']); $name = $expd[0]; $first_name = $expd[1]
Learn to use the search and php.net , or php.su
Answer for ZhiV
//$_POST['firstNameLastNamePatronymic'] = 'ΠΠ½Π΄ΡΠ΅ΠΉ ΠΡΡΠΈΠ½ΠΎΠ² ΠΠ»Π΅ΠΊΡΠ°Π½Π΄ΡΠΎΠ²ΠΈΡ'; $explode_ARR = explode(' ', $_POST['firstNameLastNamePatronymic']); $firstName_STR = $explode_ARR[0]; $lastName_STR = $explode_ARR[1]; $patronymic_STR = $explode_ARR[2]; var_dump($firstName_STR, $lastName_STR, $patronymic_STR);
- With the
list
prettier. - Oleg Arkhipov - And if there is a surname, first name and patronymic ... - Zhi V
- @ZhiV if the format has not changed, then: (I will add the answer). - Andrey Arshinov
|
list($name,$sename) = explode(' ','ΠΈΠΌΡ ΡΠ°ΠΌΠΈΠ»ΠΈΡ');
|