...

View Full Version : Placing a gif image in php



rod6
09-06-2009, 03:29 PM
I'm trying to insert a gif image right after "hits" number.

if($this->getConfig('showhits') == 1)
{
$output .= "<span class=\"".$csstag."hits\">".JText::_('')." ".$obj->imgcounter."</span><br />\n";

}

Here is a code for an image.
<img src="modules/mod_joompic/ranking_pics/hits.gif"></img>

It just gives me an error anywhere I place the code above.

What is the right coding for this? Thanks.

whizard
09-06-2009, 03:34 PM
if($this->getConfig('showhits') == 1)
{
$output .= "<span class=\"".$csstag."hits\">".JText::_('')." ".$obj->imgcounter."</span><br />\n";
$output .= '<img src="modules/mod_joompic/ranking_pics/hits.gif"></img>';
}


the .= operator means that the variable is appended.

Dan

rod6
09-06-2009, 04:52 PM
Thanks a lot. It did work.

I'm learning PHP and I really liked the way you explained.

You do have a great day.:)

whizard
09-06-2009, 07:04 PM
Glad you got it working! Never be afraid to ask questions here as you learn!

Dan



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum