esedic
6/7/2014 - 8:18 AM

Loop through array and increase values

Loop through array and increase values

<?php
$count = 1;
$values = array("1","2","3");
	echo "<ul>";
foreach($values as $value){
    echo "<li data-id=\"id-".$count."\" data-type=\"".$value['class']."\">test</li>\n";
    $count++;
}
	echo "</ul>";