Re: Can the pic include be based on a variable?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 9:54 AM -0600 5/25/06, Tristan wrote:
Can the pic include be based on a variable?

my client asked me this question. I have a movie that is the header to
the site and it pulls in a swf that calls a picture from pic00.jpg.
I'm not sure exactly what he means by this. I'm assuming he wants to
pass flash a variable name instead of a hardcoded file name but, I'm
not sure exactly how to do this. Am I on the right track? Can someone
show me an example or point me in the right direction?

Thanks,
T

T:

If I understand you correctly, you just create a variable for the first part of the image and then add on ".jpg" or whatever and then place it in your html <img> tag.

The following is an example taken from my: http://xn--ovg.com/location

php

$flag = "flags/".strtolower($country_code).".png";

html

<fieldset class="bgblue">
<legend>Your location</legend>
<?php echo ("Country: $country_name - $country_code &nbsp; <img src=\"$flag\" >");?>
</fieldset>

What this does is pull in a flag image of the county and show it to the user. I have no idea who the user is, but their IP gives me an indication that I then lookup in a dB. From there, I pull out the corresponding flag and assemble the <img src"<whatever>" call.

Get the idea?

hth's

tedd
--
------------------------------------------------------------------------------------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux