Hello, I an application developer php site : I an application developer php site. My topic is to retrieve the data on the site (https://www.agriconomie.com/assortiment-de-pouples-beta-double-spire/p210645) (this is a single page) existing and display them. I started and I am currently stuck. I have retrieved the desired values (from articles the article name, price as well as other values below) in 3 different tables using the pregmatch function of php. It remains for me to display them in a table with 2 dimensions. The table will have in the first line the article name and the price. The rest of the lines will contain the titles followed by the values.This is my php code:


<?php

    $debut="https://www.agriconomie.com";
      $txt = file_get_contents('https://www.agriconomie.com/pieces-agricoles/tracteur/attelage---relevage/pc2902');    /*ici c'est pour Lire la page html*/
        
       $results = array();
      // $test = preg_match_all('#<a href="(.*?)">#', $txt, $names_array);
        
    	
    	$test = preg_match_all('#<a href="(.+)" class="(.+)" title="(.+)"#', $txt, $names_array);
    		
    	
    	/*recupéré les liens du site  en particuliers le text qui se situe entre griffe "" du href*/
    	
    	for($i = 0; $i < count($names_array[1]); $i++) 
    		{
    			$j=$i;
    			
    			$debut="https://www.agriconomie.com".$names_array[1][$i]; 
    						
    			$adresse =$debut;
    			
    			
    		     /* echo $adresse ; ?>	 <br /> <?php */
    			 
    			    $page = file_get_contents ($adresse);
    			 
    		     /* preg_match_all ('#<h3 class="product-name">(.+)</h3>#', $page, $names_array5); */					   
    				preg_match_all ('#(<dd>(.+)</dd>)#', $page, $names_array2); 
    				preg_match_all ('#<span><i class="icon-chevron-right"></i>(.*?)</span>#', $page, $names_array3); 
    		        preg_match_all ('#<p class="price" itemprop="price" content="(.*?)">#', $page, $names_array4);
    
    				
    echo "<center>";
    
    
    echo "<table class='table table-bordered table-striped table-condensed'>";
    
    /*
     for($j = 0; $j < count($names_array5[1]); $j++)  
    					{
    						$NOM   =  $names_array5[1][$j]; 
    							
    						  echo  'Nom ='.$NOM ; 
    						  
    					}   */ 
    
    
    
    	 for($j = 0; $j < count($names_array4[1]); $j++)  
    					{
    						$price   =  $names_array4[1][$j]; 
    							
    						  echo     'Prix ='.$price.'$' ; 
    						  
    					} 
    
    
     for($i = 0; $i < count($names_array3[1]); $i++) 
    	 
        {
    		 for($j= 0; $j < count($names_array2[1]); $j++){
    			 
    			  $descriptif   =  $names_array2[1][$i];   
    	  	   			 
    														}
    		
    	    $intitule   =  $names_array3[1][$i]; 
    			
    		 
    			 	
    	echo "<tr><td>".$intitule." </td>  <td> ".$descriptif." </td> </tr> ";
    		  
    				} 
    													 		
    		}
    				
    			
    echo "</table>";
    
    
    echo "</center>";

?>



Please help me.
