Jump to content

while loop


justinh

Recommended Posts


<?php
        while ( $objComport->LastError == 0 )


        {


           $result = preg_match_all('/ *([1-9]+[a-z]) */', $objComport->ReadString(), $all_matches);
           
           $ct = count($all_matches); 
           
           for($i = 0; $i <= $ct; ++$i){
             
             echo $i . $all_matches[$i] ."<br>"; 
           }



     }

?>

 

Since this is in a while loop, I'm guessing I need to do something different with the $all_matches array.

 

How would you add the current information to the array?

Link to comment
https://forums.phpfreaks.com/topic/143591-while-loop/
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.