通过php创建列表组(bootstrap)(vcard文件中的计数联系人)

Example: If My Vcard have a 10 contact. Show 10 list group .

I try for loop : for($i=0; $i<$vcard; $i++)

In html: <a href="" class="list-group-item"> </a> In php: I don't know how to create that

I have no idea to do right now. Can you help me?

in html in php I dont know how to create that

Assuming $vcard is an array you could do

foreach($vcard as $contact) {
  // do something with the data of $contact
}

PHP manuael foreach

But you can also stay with your for-loop

for($i=0; $i < count($vcard); $i++) {
  // do something with data of $vcard[$i]
}