Jump to content

[SOLVED] loop through 2 arrays?


frozenlight777

Recommended Posts

I have 2 arrays that i need to loop through at the same time. Each array has the same number of values. I'm thinking of something like this....

 

while (list(, $value , $value2) = each($_POST['Asset_Tag'], $_POST['Service_Tag'])) {
	 echo "Value: $value : $value2 <br />\n";
} 	
exit;

 

2 loops works fine but i need it in 1... is it possible?

Link to comment
https://forums.phpfreaks.com/topic/107795-solved-loop-through-2-arrays/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.