To get data from a php file to an android application
<p>I am a newbie in using android applications. I would like to get data from a php file to android and I do not know how to do it.</p>

<p>I will use a simple example of a php code which I want to get into android:</p>

<pre><code>$array = array(0 =&gt; 'zero', 1 =&gt; 'one', 2 =&gt; 'two'); 
print $array;
</code></pre>

<p>This script is here:  <a href="http://johnyho.net/index.php" rel="nofollow">http://johnyho.net/index.php</a></p>

<p>Can you please give me an advice how to get this field into the android.
Thank you very much.</p>

<p>main.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    &gt;
&lt;TextView  
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="@string/hello"
    /&gt;
&lt;/LinearLayout&gt;
</code></pre>

<p>AndroidManifext.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="org.android.websevice.client.samples"
      android:versionCode="1"
      android:versionName="1.0"&gt;
    &lt;uses-sdk android:minSdkVersion="8" /&gt;
&lt;uses-permission android:name="android.permission.INTERNET"&gt;&lt;/uses-permission&gt;
    &lt;application android:icon="@drawable/icon" android:label="@string/app_name"&gt;
        &lt;activity android:name=".AndroidClientService"
                  android:label="@string/app_name"&gt;
            &lt;intent-filter&gt;
                &lt;action android:name="android.intent.action.MAIN" /&gt;
                &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
            &lt;/intent-filter&gt;
        &lt;/activity&gt;

    &lt;/application&gt;
&lt;/manifest&gt;
</code></pre>
