$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?

  • substr($p, 1, 3).'/'.substr($p, 4) - Vadim Prokopchuk

1 answer 1

  $p = 123456; echo substr_replace($p, '/', 3, 0); получаем: 123/456 
  • thank. I will answer in a couple of minutes. here is a limit to the campaign) - Solo_777