[thelist] php display "" '' / gif?

Keith Dahlby dahlbyk at softhome.net
Sun Mar 9 14:20:01 CST 2003


I think you're just matching up the quotes in the wrong place.  In my
experience, the easiest way to manage HTML tag attributes is printf():

printf( '<img src="%s/images/Clover/%s.gif">' , $Relative , $County );

Your other option would be to single-quote all your strings (escaping \"
can be messy, and '-quoted strings parse faster):

echo '<img src="' .$Relative. '/images/Clover' .$County. '.gif">';

HTH

Cheers ~ K

At 12:15 PM 3/9/2003, you wrote:
>I have a line of code that displays an image for example:
>
>echo "<img src=\"$Relative/images/Clover".$County . '.gif'>";
>
>however the image wdoesn't show?
>
>If I have:
>
>/* Image here */
>echo "<img src=\"$Relative/images/Clover/".$County."\">";
>/* Image will END here */
>
>The image shows but *** the image will only show if it has *no* file extention
>:(
>
>I want a file extention .gif any ideas where the code is tricking me :)
>
>Andrew




More information about the thelist mailing list