KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
In Python I can write: for i, val in enumerate(lst): print i, val The only way I know how to do this in PHP is: for($i = 0; $i < count(lst); $i++){ echo "$i $val\n"; } Is there a cleaner way in PHP?
Tags (comma-separated)
Save Edits
Cancel