$p = 123456; $arr1 = str_split($p); echo $arr1[0] . $arr1[1] . $arr1[2] . '/' . $arr1[3] . $arr1[4] . $arr1[5]; получаем: 123/456 Are there any other options for how this can be arranged?
$p = 123456; $arr1 = str_split($p); echo $arr1[0] . $arr1[1] . $arr1[2] . '/' . $arr1[3] . $arr1[4] . $arr1[5]; получаем: 123/456 Are there any other options for how this can be arranged?
Source: https://ru.stackoverflow.com/questions/620191/
All Articles
substr($p, 1, 3).'/'.substr($p, 4)- Vadim Prokopchuk