Jump to content

Mind boggling array


maliary

Recommended Posts

Hi,

 

I have this code that retrives a string from a database. The String is retrieved correctly, however the string is made of parameter names and their values concatenated together with characters as the separators.

 

I am trying to separete the two and display them correctly along side other data in the table but with little success.

 

$dbtable = 'test_findings'; 
         $depts = $db->Execute("SELECT * FROM $dbtable WHERE batch_nr='87'");                 
          while($row= $depts->FetchRow()){ 
              
         $h = $row['serial_value'];    -- This is the string    
         $keywords = preg_split ("/[\=,\&]+/", "$h"); -------[color=blue] I remove the characters here   [/color]    
                
         
                foreach ($keywords as $value)
{
  <tr><td class=va12_n><font color=#000000>'.$value.'           <t /></td>
} 
<td valign=top> '.$row['ranges'].' </td>';   ---- [color=blue]other data from the table[/color]
   <td valign=top> '.$row['msr_unit'].' </td>
  </tr> 

 

 

I would like to display it thus, in four diffrent columns?

parameter range msr_unit value

 

How can I out put the parameter name and value, and display it as above?

 

Link to comment
https://forums.phpfreaks.com/topic/53585-mind-boggling-array/
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.