$getuser2['User'] = array($arUser['firstname'], $arUser["lastname"], '55555555', '552925049', $arUser["email"], ['City', 'Street 11']); echo json_encode($getuser2); 

How to add to the array here what is highlighted in red in the image? red text selected, you need to add to the array

  • like this - `$ getuser2 ['Email'] = Array (" 1 "," Email not found ");` or specify the task. - KoVadim
  • @KoVadim, and where is "Error" ? - Grundy
  • one
    there is such a small red that I read Email instead of Error $getuser2['Error'] = Array("1", "Email not found"); - KoVadim
  • No, they did not understand correctly, @KoVadim, I now have {"User":["we3wewe","wewewe","55555555","552925049","mephis_top_heles@mail.ru",["City","Street 11"]]} and I need this way {"User":["we3wewe","wewewe","55555555","552925049","mephis_top_heles@mail.ru",["City","Street 11"]], "Error":["1", "Email not found"]} - Uzeyr Zeynalzade
  • then paint in more detail. Telepaths on vacation. - KoVadim

1 answer 1

 $getuser2['Error'] = array("1", "Email not found"); 

=) copied from comment, hah

  • where did you see Email ? :) - Grundy