On Thu, Feb 21, 2008 at 8:04 PM, Mário Gamito <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  Sorry for such a laim question.
>
>
>
>  I have this code:
>
>  $host = 'http://' . $_SERVER['HTTP_HOST'];
>
>  "foreach($browser as $key => $val){
>          echo "<img src=\"dcs/" . $key . '.png"' . " />" . " ";
>          (...) "
>
>
>  but it has a bug, I need to add the server domain before the picture, so
>   I did:
>
>  $host = 'http://' . $_SERVER['HTTP_HOST'];
>
>  "foreach($browser as $key => $val){
>          echo $host . "<img src=\"dcs/" . $key . '.png"' . " />" . " ";
>          (...)"
>
>  But this way, all it echoes is the $host variable.
>
>  What am I missing here ?
>
>  Any help would be appreciated.
>
>  Warm Regards,
>  Mário Gamito
>


Not the problem, but:

echo "<img src=\"dcs/" . $key . '.png"' . " />" . " ";

can be condensed to:

echo "<img src=\"dcs/$key.png\" /> ";

-- 
-Casey

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

Reply via email to