advanced code snippet search
priteshloke on 01/16/11
array
01/16/11 05:33pm
$list = array(2 => 'Pritesh' , 3 => 'Sumit', 4 => 'Mehul', 'max' => 'pain');iterate_array_with_for($list);function iterate_array_with_for($list){ $list_count = count($list); if ($list_count > 0) { reset($list); for ($i = 0; $i < $list_count; $i++, next($list)) { $value = current($list); $key = key($list); print "key $key and value $value <br />"; } }}
Report this snippet Tweet
Comment:
You need to login to post a comment.