I have the following code;_

        $sql = "select * from  text where id    = '$id' ";
                
        $row = fetch_row_row( $sql, $db );
        
        $img_loc                        = $row["img_loc"];
        $text_type                      = $row["text_type"];
        $seq                                    = $row["seq"];
        $rec_type                       = $row["rec_type"];
        $section                        = $row["section"];
        $code                           = $row["code"];
        $repeat                         = $row["repeat"];
        
        $description            = $row["description"] );
        $text                   = $row["text"] );


Was wondering if there was a clever way of doing this with foreach on
$row.  something like

foreach( $row as $index => value ) {
        create_var( $index, $value );
}

So the question is is there a function like create_var which takes a
string and a value and creates a variable?

Ben
-- 
Ben Edwards - Poole, UK, England
If you have a problem sending me email use this link
http://www.gurtlush.org.uk/profiles.php?uid=4
(email address this email is sent from may be defunct)

-- 
Ben Edwards - Poole, UK, England
If you have a problem sending me email use this link
http://www.gurtlush.org.uk/profiles.php?uid=4
(email address this email is sent from may be defunct)

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to