Jump to content

Can i use php to loop through two arrays the same time for example like in JS ?


jd2007

Recommended Posts

How do you mean?

 

<?php

$ArrayOne = array('one','two','three');
$ArrayTwo = array('1','2','3');

echo 'Array One<br />';
foreach($ArrayOne as $Text){
echo $Text . '<br />';
} 
echo '<br />Array Two<br />';
foreach($ArrayTwo as $Numbers){
echo $Numbers . '<br />';
} 
?>

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.