I'm trying to put php generated images and text in the same page and it's not working out for me right now.
I took the sample code from the php manual for [man]imageellipse/man and tried to add an echo statement to the code.
<?php
// create a blank image
$image = imagecreate(400, 300);
// fill the background color
$bg = imagecolorallocate($image, 0, 0, 0);
// choose a color for the ellipse
$col_ellipse = imagecolorallocate($image, 255, 255, 255);
// draw the ellipse
imageellipse($image, 200, 150, 300, 200, $col_ellipse);
// output the picture
header("Content-type: image/png");
imagepng($image);
?>
If I add an echo at the beginning, I get a white box with a red "X" what happens when an images fails to load, and if I try to echo at the end it does nothing. Any hints? I think it might have something to do with the header but I can't figure out what it should be.