Read the mysql and display the value on the text box

I have the following coding and want to display the value of "ChannelName" on textbox 1. I have attached the blocks here. Please tell me how to fix it.

include './config2.php';

$sql = "SELECT *
		FROM InternetRadio_Link
		ORDER BY ChannelNo";

$result = $pdo->query($sql);

foreach($result as $row) {
		echo $row["id"],$row["ChannelNo"],$row["ChannelCounty"],$row["ChannelName"],$row["ChannelURL"],$row["ChannelPlayPic"];

Please show your response content, preferably as text

The result on my mobile as attached.

The result of executing the MySQL;

11Germanyrbb Fritz - Berlin 102.6 FM France Culture StatesWFDU Retro Radio 89.1 FM - Teaneck, NJ oe1campus KingdomCapital London 95.8 FM from the Navy, FM 88.5 Sor.Tor.1, Wangnanthayuthaya;stream.mp3http:// FM 91.3 - Singapore Italia Radio - Lazio 93.1 Broadcasting Service (PBS) 89.9 - Kuala Lumpur

Doesn't look like a dictionary, just a list of URLs. You would need to use text manipulation to extract the channel names if you can . May be better to look at your query again...

May I know if you have any examples for me to follow?

You need to check your query, it does not appear to be returning the data you are requesting....

Thank you very much. I have reworked it again, but it still does not work.

jsonformatter.txt (3.8 KB)

OK, that is a good looking json response, just need to parse it correctly now....

If you a still struggling to ouput the data, see here:

I actually changed the display method, so I want to use the dynamic component to show the list. But I got the following error. Can you please tell me how to fix it?

What is the content of Channel2.json ?

please find the json file attached.

Channel2.json (3.8 KB)

Just looking at your blocks again, you probably should use:



otherwise you are making a list, not a dictionary

Try this for starters:

getCh2.aia (3.3 KB)

Thank you very much, and I learned a lot from you. However, if I want to display a flag of each country and its channel name (see attached). Each country flag is in the exact location "" where the country name is referred by JSON file "ChannelCounty". When clicking the respective country flag, it will play the song and the URL of the song is in the JSON file "ChannelURL". How can I do that?


The screen is according to the "aia" file you provided.

Try this

getCh2v2.aia (41.5 KB)

I had to use a flags extension, because your urls are inaccessible (local?)

yes, you are right. I have configured the firewall, so you can access them in the new json file.


Channel2.json (4.2 KB)

Finally, I can load the country flags and play their radio respectively. But the App responds a bit slowly. May I know what I can improve it?
getCh2.aia (38.0 KB)

It is slow because of the time it takes to get all of the images (even though they are small in size). Just remove the image block and replace it with an empty test block, you will see the difference.

Might be better to download the images to the device on first run, then load them to the list view from the local files. (or get all the images and upload them to the media folder - assets - in the app)

I have completely reworked it (gone back to AI2 lists), and loaded images to the assets.

There is still a delay while the player get the radio source, but i used a notifier progress dialog to help with that.

Two of your stations; Philippines and Italy do not work with the player, so I have removed those from your json.

getCh2Slow2.aia (97.7 KB)

Thank you for your kind assistance, please allow me to study from your working again.

If you haven't yet noticed, there is a Country.json file at

with flag emojis.

That should help speed up lookups, since it's all local.