View Full Version : How generate the ID for the dynamic images with the help of Magic Zoom

12-12-2008, 10:08 AM

can one help me

I am using Magic Zoom to zoom my images in a particular position
here is the link they explained in the three lines how to zoom image in a particular position? please see it

In this link u see only the Zoomed Area position part of explanation
after seeing that link hope you may got idea

they passed the Id="zoom4" in <a> tag

<a href="big.jpg" rel="zoom-position: custom" id="zoom4"><img src="small.jpg" /></a>

and in the <div> tag they passed
same id with suffixed -big

<div class="yourstyle" id="zoom4-big"></div>

this we can done for the static images with different Id's,
but for the dynamic images we need to provide the Id by getting it from the database(Each record in database usually has an ID)


here is my problem i got all the Id' from my database and stored them in a variable called $styl (below you an see)
now i need to suffix that variable with '-big' in the div tag
i am confused with that please help me
i tried to suffix that but i can't see the zoom image

<style type="text/css">

<div class="yourstyle" id="<?php echo trim($styl);?>"+"-big">


$query2="select style from styles";




$styl=$obj3->style; //Id stored in this varibale $styl

echo '<td><a title="'.$styl.'" href="'.$big.'" class="MagicZoom" rel="zoom-


id="'.trim($styl).'"><img width="170px" height="100px" src=" ' . $cimage . ' "



please tell me what wrong am i doing

hope u understand my problem

waiting for the reply