Need help PHP/Image creator

Discussion in 'PHP' started by amuthavalli, Jun 30, 2009.

  1. #1
    i need help,

    i want the output for text on the image. that is
    see the code
    <?php
    $str="<b>Hello World</b>";
    $im = imagecreatetruecolor(500, 500);
    $text_color = imagecolorallocate($im, 233, 255, 100);
    imagestring($im, 1, 5, 5,  $str, $text_color);
    header('Content-type: image/jpeg');
    imagejpeg($im);
    imagedestroy($im);
    ?>
    
    Code (markup):
    i got the output is <b>Hello World</b>

    but, i need the output is Hello World
    on the image

    please any one have idea?
     
    amuthavalli, Jun 30, 2009 IP
  2. ItamarP

    ItamarP Member

    Messages:
    56
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #2
    when you deal with HTML tags as <b></b> you should use "echo"


    i guess you sholud try integrating it in " imagestring "

    ;)
     
    ItamarP, Jun 30, 2009 IP
  3. amuthavalli

    amuthavalli Peon

    Messages:
    110
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    no. i'll get the file(html/script) into the string and the string will be display into the image using image creator function.
     
    amuthavalli, Jun 30, 2009 IP