help in dis small code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    help in dis small code

    hi there,
    i want to make that banner_width sould be less than 400
    and
    height less than 100
    how 2 edit bellow code

    $banner_width="400";
    $banner_height="150";

    http://WapTops.com- Get Real High Traffic
    http://WapFun.info-Fun 4 Wap

    #2
    PHP Code:
    <img src=\"image.gif\" width=\"400\" height=\"150\" alt=\"image.gif\"/> 
    Want something coded email me at sales@webnwaphost.com for a prices.




    Comment


      #3
      I dont know why, but in some php and all static html pages "\" are not necessary...

      Comment


        #4
        Originally posted by crazybrumi View Post
        PHP Code:
        <img src=\"image.gif\" width=\"400\" height=\"150\" alt=\"image.gif\"/> 
        Wrong. There will be no \ in html.

        I dont know why, but in some php and all static html pages "\" are not necessary...
        in html you don't need \. you will need \ to escape " only when you will use echo in double qoutes, if you don't use \ you see ASCII=92 error. But if you use echo in single qoutes you don't need to use \ before "

        like

        echo '<img src="image.gif" width="400" height="150" alt="image.gif"/>';

        Comment


          #5
          PHP Code:
          $size getimagesize($banner);
          if(
          $size[0]>140||$size[1]>$150){
          $size[2] = "width=\"140\" height=\"150\"";
          }
          echo 
          "<img src=\"$banner\" $size[2] alt=\"banner\"/>"

          Comment


            #6
            Originally posted by something else View Post
            PHP Code:
            $size getimagesize($banner);
            if(
            $size[0]>140||$size[1]>$150){
            $size[2] = "width=\"140\" height=\"150\"";
            }
            echo 
            "<img src=\"$banner\" $size[2] alt=\"banner\"/>"
            thanks,
            thats wat i need

            http://WapTops.com- Get Real High Traffic
            http://WapFun.info-Fun 4 Wap

            Comment


              #7
              sorry double post

              http://WapTops.com- Get Real High Traffic
              http://WapFun.info-Fun 4 Wap

              Comment

              Working...
              X