Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.