sanju were
sanju were

Reputation: 11

Display a single image from folder using php

i am having a issue on my osclass theme. I want to display a particular image from my folder manually. The images are in the folder and i am using this function to display the image, could someone help.

  if(!function_exists('aiclassy_draw_ad')) {
        function aiclassy_draw_ad(){
            echo '<div class="advertise_area">
I want my image to be called here
           </div>';

            echo ' <br /> <div class="advertise_area">

            </div>';
              echo ' <br /> <div class="advertise_area">

            </div>';
              echo ' <br /> <div class="advertise_area">

            </div>';

        }
    }

Upvotes: 0

Views: 696

Answers (2)

vaso123
vaso123

Reputation: 12391

Is it what you need?

echo '<div class="advertise_area">
          <img src="http://morelook.com/content/uploads/2011/07/advertise_here_250x250.png" alt="" />
      </div>';

EDIT

Based on OP comment: JSFIDDLE

Turn off your adblocker if you have.

Upvotes: 0

Bud Damyanov
Bud Damyanov

Reputation: 31829

You should place an image tag in your div tag, like this:

  if(!function_exists('aiclassy_draw_ad')) {
    function aiclassy_draw_ad(){
        echo '<div class="advertise_area"><img src="image.jpg" alt="" /></div>';

        echo ' <br /> <div class="advertise_area">

        </div>';
          echo ' <br /> <div class="advertise_area">

        </div>';
          echo ' <br /> <div class="advertise_area">

        </div>';

    }
}    

Upvotes: 0

Related Questions