Displays only last data
-
I am using the following code below but was able to display only the last data group. What is wrong with the code. How to display repeated data.
<?php $repeatable_field_values = simple_fields_values("rec_name,rec_desc,rec_homeurl,rec_logo"); foreach ($repeatable_field_values as $values) $file_id = $values["rec_logo"]; $image_info = wp_get_attachment_image_src($file_id, "thumbnail"); $image = $image_info[0]; { echo "<table border='1' cellspacing='1' cellpadding='1' style='width: 100%'> <tbody> <tr> <td rowspan='3' colspan='1' style='text-align:center;'><img src='$image' alt='".$values["rec_name"]." logo'/></td> <td rowspan='1' colspan='3' style='text-align:center;'><a href='".$values["rec_homeurl"]."' target='_blank'><strong>".$values["rec_name"]."</strong></a></td> </tr> <tr> <td rowspan='1' colspan='3'>".$values["rec_desc"]."</td> </tr> <tr> <td><a href='".$values["rec_homeurl"]."' target='_blank'>Home</a></td> <td></td> <td></td> </tr> </tbody> </table>"; } ?>
Please help!
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Displays only last data’ is closed to new replies.