PHP - Oracle - BLOBs - Display BLOB data in a table

From: Date: Wed, 03 Dec 2003 22:45:32 +0000
Subject: PHP - Oracle - BLOBs - Display BLOB data in a table
Groups: php.general 
Request: Send a blank email to php-general+get-171739@lists.php.net to get a copy of this message
I have written the first half of my application which stores images in BLOB fields of an oracle database. This part of my app. works fine. I am now trying to download the database stored blob and display it in my web page. I am able to get the blob data into a variable called $blobdata. If I just throw up a fresh page and issue the following code, the image displays fine: <?php Header( "Content-type: $type"); echo $blobdata; ?> Assume that I have a function which when given an image id it returns the blob data as follows: $blobdata = get_image_data(2); // Get the blob data for image as stored in the database with id = 2 However, I would like to be able to place the blobdata say in a table cell as follows: <table><tr><td> <?php $blobdata = get_image_data(2); echo $blobdata; ?> </td></tr> only problem is that I am getting gobbledygook charcaters in the cell as the raw data is being printed, what sort of HTML or PHP functions should I use to do this? many thanks, Ahbaid.

« previous php.general (#171739) next »