angelsofpromise Posted January 31, 2007 Share Posted January 31, 2007 hi i've got this picture <?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" >' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>i would like to set a class so i can use some css on this picture but i dont know how to add a class in php thanks ahead of time. i need the code to have class="reflect" in the image tag when the html compiles. Quote Link to comment https://forums.phpfreaks.com/topic/36419-css-class-php-picture/ Share on other sites More sharing options...
Quoth Posted January 31, 2007 Share Posted January 31, 2007 nope what i suggested was rubbish :D sorry Quote Link to comment https://forums.phpfreaks.com/topic/36419-css-class-php-picture/#findComment-173292 Share on other sites More sharing options...
Hypnos Posted January 31, 2007 Share Posted January 31, 2007 Modify the tep_image function, or send the results to a string and modify them.[code=php:0]$imagecode = tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5"');$imagecode = str_replace("<img", "<img class=\"reflect\"", $imagecode);[/code] Quote Link to comment https://forums.phpfreaks.com/topic/36419-css-class-php-picture/#findComment-173424 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.