Hi guys, I have a very basic problem. I am trying to link data to another field from a working one but the variable is not being added. The one in bolded black is the original, and the one in red doesn’t work. I needed to take away the $link_text since the text linked will be .$val. (price) In essence, I want to link [price] ith the [main link] so when users click on [price] they are taken to that site’s link.
Can someone please tell me what I’m missing?
echo "Rating More Info "; echo "";$i = 1; $class = 'alternate'; foreach ($posts as $post) { $class = ($class == 'alternate') ? '' : 'alternate'; echo "<tr class='$class'>"; $img = WP_PLUGIN_URL . "/review-site/images/" . $i . ".png"; echo "<td class='comparison_rank'><img src='$img' alt='$i' /></td>"; echo "<td class='comparison_title'>" . $post->post_title . "</td>"; foreach ($fields as $field) { if (!empty($field)) { $val = get_post_meta($post->ID, $field, true); echo "<td class='comparison_field'>[b]<a href='" . visit_site_link($post->ID) . "'>"[/b] . $val . "</td>"; } } $rating = get_average_rating($post->ID); echo "<td class='comparison_average'>" . num_to_stars($rating) . "</td>"; echo "<td class='comparison_links'>"; [b]echo visit_site_link($link_text, $post->ID);[/b] echo "<br /><a href='" . get_permalink($post->ID) . "'>reviews</a>"; echo "</td>"; echo "</tr>"; $i++; } echo "</table>";</blockquote>