Hello,
i would like to know how i can get better output from a foreach.
this code:
outputs:
stdClass Object ( [plaatjes_ID] => 1 [plaatjes_name] => Screenie [plaatjes_images] => \screenshot.png [plaatjes_status] => 1 )
object(stdClass )[3]
public 'plaatjes_ID' => string '1' (length=1)
public 'plaatjes_name' => string 'Screenie' (length=8)
public 'plaatjes_image s' => string '\screenshot.pn g' (length=15)
public 'plaatjes_statu s' => string '1' (length=1)
what i would like to see is a normal list of 'plaatjes_name' and it's image, like:
name: screenie
image: \screenshot.png
Thanks in advance.
~muckymuck
i would like to know how i can get better output from a foreach.
this code:
Code:
$x = $wpdb->get_results("SELECT * FROM " . WP_PLAATJES);
foreach ($x as $y) {
print_r($y);
var_dump( $y );
stdClass Object ( [plaatjes_ID] => 1 [plaatjes_name] => Screenie [plaatjes_images] => \screenshot.png [plaatjes_status] => 1 )
object(stdClass )[3]
public 'plaatjes_ID' => string '1' (length=1)
public 'plaatjes_name' => string 'Screenie' (length=8)
public 'plaatjes_image s' => string '\screenshot.pn g' (length=15)
public 'plaatjes_statu s' => string '1' (length=1)
what i would like to see is a normal list of 'plaatjes_name' and it's image, like:
name: screenie
image: \screenshot.png
Thanks in advance.
~muckymuck
Comment