Wednesday, 15 August 2012

php - How to insert array in imagecreatefromjpeg parameter -



php - How to insert array in imagecreatefromjpeg parameter -

currently i'm trying write text image using imagecreatefromjpeg. got next code. note: next code simplified version.

$im = imagecreatefromjpeg("images/inhouse_product9.jpg");

after wish phone call info database , insert array in imagecreatefromjpeg parameter. means need replace "images/inhouse_product9.jpg" load_image_excerpt.php?id= $img['file_id'];.

note: load_image_excerpt.php code read info database. $img['file_id'] array within loop.

i know next code wrong, hope can right me. thanks.

$im = imagecreatefromjpeg("load_image_excerpt.php?id=$img['file_id']");

see code below. illustration of can utilize in load_image_excerpt.php. request homecoming image, can utilize in imagecreatefromjpeg method.

<?php //query database based on $_get['id'] variable. //assuming id correct, 1 row returned. $imageblobdata = $databaserow['your_blob_column']; header('content-type: image/jpg'); echo $imageblobdata; ?>

php arrays

No comments:

Post a Comment