A quick question about image sizing

Discussion in 'PHP' started by Gomeza, Jun 27, 2008.

  1. #1
    Hi Folks

    I have an osCommerce application that I am modifying and have run into one of those situations where the brain is full of methane.

    What I am trying to do is custom size the images for one page only but when I replace the variables in the code below, I keep getting a parsing error.

    Does anyone know how to re-write the following code so that I can replace the "SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT" variables with simple height and width commands?

    <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $new_products['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $new_products['products_image'], $new_products['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a>
    Code (markup):
    Thank you all in advance
     
    Gomeza, Jun 27, 2008 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #2
    What's the error?

    and replacing it with '123' instead of the given names it should work! :)
     
    EricBruggema, Jun 27, 2008 IP
  3. Gomeza

    Gomeza Well-Known Member

    Messages:
    412
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    108
    #3
    Hi EricBruggema

    Thank you for the response. The lights have come on in my brain now that you mention it. To elaborate on what you mean when you say to replace it with '123' . . . I remember now that variables can be replaced with number attributes so that: SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT is replaced with: '120','150' (width and height attributes respectively)

    Thanx again
     
    Gomeza, Jun 27, 2008 IP