Need your help

php

#1

I have problem in my soccer script

I tried to add logo for each season
everything ok except the location of the logo which is in left side of the heading
I want to put the logo right the heading
I tried but did not work
how can i correct the code in the second photo ?
Thank you and sorry for bothering you

look for attached photos


#3

I don’t see where the problem is but i beleave you have a " or ' somewhere incorrectly or missing. The closing tag </a> is blue at the end.
You code editor should give it a red color when its all correct.


#4

Thank you

this code ( print ‘

<a href="’ . $_SERVER[‘PHP_SELF’] . “?season={$seasons[‘seasonid’]}”>$seasonname<img src="{seasonlogo}\" />"; ) contains two parts print '<p><a href="' . _SERVER[‘PHP_SELF’] . “?season={$seasons[‘seasonid’]}”>$seasonname

and <img src="{$seasonlogo}" />";

it is working as it showed in the first picture

but when I put the second part of the code as first part and the first part as second part
it did not work , I did not change any think except the position of two parts
print '

<img src="{seasonlogo}\" /><a href="' . _SERVER[‘PHP_SELF’] . “?season={$seasons[‘seasonid’]}”>$seasonname";

why does work in first part and not work in second situation?


#5

Thank you
solved in this way:

    ?>
     <p><img src="<?php echo $seasonlogo; ?>" 
     
   <?php

    print '<p><a href="' . $_SERVER['PHP_SELF'] . "?season={$seasons['seasonid']}\">$seasonname</a>";

#6

If you wrap your generator strings in double quotes then you can use interpolation instead of concatenation.

"<p><a href=\"$_SERVER['PHP_SELF']?season={$seasons['seasonid']}\">$seasonname</a>";

#7

Thank you my friend , I will do


#8

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.