I have this code:
<?php
$query = mysqli_query($sqlnews,'SELECT * FROM news ORDER BY id DESC');
$count = 0;
while($count < 4 && $output = mysqli_fetch_assoc($query))
{
$count++;
echo '<div class="item"><div class="testimonials-box"><div class="testimonial-details"><h1><a class="news_subject" href="news.php?newsid='.$output['id'].'">'.$output['subject_en'].'</a></h1><br />';
echo '<span class="news_author">'.$output['postedby'].'</span><b> | </b>';
echo '<span class="news_date">'.date('l, d F Y', strtotime($output['date'])).'</span><div class="devider"></div>';
echo '<span class="news_short">'.$output['short_description_en'].'</span></div></div>';
echo '</div>';
}
?>
I wanna get the variable $output using array from another variable that also has an array, like this: $output['$id["1"]']
I get an error when trying to do this that says: Undefined index: $id["1"] in.
Notice that the array from $id is from antoher php file that is included in this one.
Thanks!