Good, I'm with a little drama in my front end. Well, I'm wanting to show with all the records of a table, what happens is that two fields are ID of another table, but when I insert inside the concatenation the function to make the change of text by ID, does not reflect anything to me, in pure PHP if it does, but when it is calling by AJAX, nothing appears. I accompany the code. Can someone give me a hand?
All records retrieved from the database are displayed here.
<div id="resultado-registro">
<?php include('destacados.php'); ?>
</div>
And here where they are prepared (only I put the final part, if necessary more info, they warn me).
$output = '';
if(!empty($faq)) {
$output .= '<input type="hidden" class="pagenum" value="' . $page . '" /><input type="hidden" class="total-page" value="' . $pages . '" />';
foreach($faq as $k=>$v) {
$output .= '
<div data-id="'.$faq[$k]["id"].'" class="item item'.$faq[$k]["id"].' image-present align-center item-featured reviews-enabled">
<a href="imagenes/servicios/'.$faq[$k]["imagen"].'" target="_blank" rel="item-gallery" class="cboxElement">
<div class="item-thumbnail">
<div class="item-thumbnail-wrap">
<img src="imagenes/servicios/'.$faq[$k]["imagen"].'" alt="" class="imagen" alt="'.$faq[$k]["nombre"].'">
</div>
<div class="item-text">
<div class="item-excerpt">
<p>
'.$faq[$k]["resena"].'
</p>
</div>
</div>
</div>
<div class="item-title">
<h3>'.$faq[$k]["nombre"].'</h3>
</div>
<div class="item-categories">
<span class="item-category">'.$faq[$k]["rubro_id"].'</span>
<span class="item-category">'.$faq[$k]["localidad_id"].'</span>
</div>
</a>
<div class="review-stars-container">
<div class="content">
<a href="servicio.php?id='.$faq[$k]["id"].'">VER</a>
</div>
</div>
</div>
';
}
}
print $output;
As you can see, where it says RUBRO_ID and LOCALIDAD_ID is where I want to apply the function so that the other table, retrieve the name of each item and location according to your ID.