Hard to say without a little more detail or seeing the entire page’s code, but I’m going to wage that your issue is $output="<div class="box"> ";
. If you’re repeating that line before echo
or print
ing $output
, then you’re losing the value of $output
. If that’s the issue, change this line to $output .= '<div class="box"> ';
and at the very top of the page, add $output="";