开发者

iphone application with HTML

I have an iPhone applcation in which I want to take facebook user's friends name. I got that friend list in an array. Now I want to display this array value in htmlpage. Later this html page display on iphone screen. So how can I call the friendslist from HTML开发者_如何学运维 page and display the name one by one. please help me.


You won't be able to pull that off in plain HTML. But using a scripting language like PHP looping over an array is very simple:

<?php
//friendsList is the array containing the names you want to loop over
foreach ($friendsList as $friend) {
  echo $friend;
}
?>

This snippet of code only works if your page has a .php extension. So serving it as .html won't work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜