且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将数组和变量从PHP发送到Android应用程序?

更新时间:2023-01-01 16:04:15

示例: getArray.php

example: getArray.php

<? echo json_encode($your_array);?>

并且在android中使用例如改造库(http客户端)

and in android use for example retrofit library(http client)

interface phpApi{
   @GET("url/getArray.php")
   Call<YourObject> getArray();
 }