GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   PHP help please (https://gfy.com/showthread.php?t=419776)

GiantGnome 01-20-2005 07:44 PM

PHP help please
 
heres the error
Parse error: parse error, unexpected T_ECHO, expecting ',' or ';'

and here is the line
"Free ", $myTxt[$pick], " E&middot;Zine</span></a>\n";

how do i fix it?
Thank you

Steen2 01-20-2005 07:44 PM

CTR + ALT + DEL


Does this work still?

d00t 01-20-2005 07:48 PM

google it..

FlexxAeon 01-20-2005 07:50 PM

i think it needs to be "Free ". $myTxt[$pick]. " E&middot;Zine</span></a>\n";

but i'm still an intermediate on PHP so i could be wrong

Cogitator 01-20-2005 07:50 PM

:1orglaugh

You have to show the lines before and after it. No one can tell what you're trying to do in that one line.

GiantGnome 01-20-2005 07:55 PM

Quote:

Originally Posted by Cogitator
:1orglaugh

You have to show the lines before and after it. No one can tell what you're trying to do in that one line.

fine, heres before and after.

echo "<span style=\"font-size: 16pt; line-height: 120%; font-family: Times New Roman, Arial, Courier, sans-serif\">\n"
echo "Free ", $myTxt[$pick], " E&middot;Zine</span></a>\n";
echo "</div>\n";

Damian_Maxcash 01-20-2005 07:56 PM

echo "<span style=\"font-size: 16pt; line-height: 120%; font-family: Times New Roman, Arial, Courier, sans-serif\">\n";
echo "Free ", $myTxt[$pick], " E&middot;Zine</span></a>\n";
echo "</div>\n";

StuartD 01-20-2005 07:56 PM

echo "<span style=\"font-size: 16pt; line-height: 120%; font-family: Times New Roman, Arial, Courier, sans-serif\">\n";
echo "Free ", $myTxt[$pick], " E&middot;Zine</span></a>\n";
echo "</div>\n";

You're missing the ; after the first line.

GiantGnome 01-20-2005 08:05 PM

Thank you damian and Stuart.

Cogitator 01-20-2005 08:07 PM

didn't mean to be rude. but it is helpful to see more than just one line. glad the problem is fixed :thumbsup

GiantGnome 01-20-2005 08:14 PM

Quote:

Originally Posted by Cogitator
didn't mean to be rude. but it is helpful to see more than just one line. glad the problem is fixed :thumbsup

Thats ok. I didnt think you were rude. :upsidedow

Azlord 01-20-2005 08:18 PM

It's easier and a lot cleaner to break out of the php and then use short hand for echoing it out

<?=$blah?>
That way you don't have to escape a ton of " marks.

<span style="font-size: 16pt; line-height: 120%; font-family: Times New Roman, Arial, Courier, sans-serif">
Free <?=$myTxt[$pick]?> E&middot;Zine</span></a>
</div>

Linguist 01-20-2005 08:30 PM

Quote:

Originally Posted by NichePay - StuartD
echo "<span style=\"font-size: 16pt; line-height: 120%; font-family: Times New Roman, Arial, Courier, sans-serif\">\n";
echo "Free ", $myTxt[$pick], " E&middot;Zine</span></a>\n";
echo "</div>\n";

You're missing the ; after the first line.

You don't need the ; cause echo can span several lines

Try this as was suggested above:

echo "Free ".$myTxt[$pick]."E&middot;Zine</span></a>\n";

Varius 01-20-2005 08:51 PM

Forget echoing html ever again. Start doing this NOW, you'll thank me in the future :winkwink:

Use Smarty - a templating engine for PHP.

http://smarty.php.net/

GiantGnome 01-21-2005 01:38 PM

what about this one?

if (stristr($_SERVER["SERVER_SOFTWARE"], "apache") !hahahaha false)
include( "http://" . $_SERVER["SERVER_NAME"] . "/scripts/febfpa2link.html" );

?>

StuartD 01-21-2005 01:43 PM

Quote:

Originally Posted by GiantGnome
what about this one?

if (stristr($_SERVER["SERVER_SOFTWARE"], "apache") !hahahaha false)
include( "http://" . $_SERVER["SERVER_NAME"] . "/scripts/febfpa2link.html" );

?>

I'm asuming you have a double equal sign after that !

Don't... it's just !=

example:

Code:

if (stristr($_SERVER["SERVER_SOFTWARE"], "apache") != false)
        include( "http://" . $_SERVER["SERVER_NAME"] . "/scripts/febfpa2link.html" );


Dalai lama 01-21-2005 01:47 PM

alt + 4 should work

GiantGnome 01-21-2005 01:54 PM

Quote:

Originally Posted by NichePay - StuartD
I'm asuming you have a double equal sign after that !

Don't... it's just !=

example:

Code:

if (stristr($_SERVER["SERVER_SOFTWARE"], "apache") != false)
        include( "http://" . $_SERVER["SERVER_NAME"] . "/scripts/febfpa2link.html" );


Thanks again!

GiantGnome 01-21-2005 03:30 PM

Hey Stuart, please icq me if you can. 172768566

StuartD 01-21-2005 03:47 PM

Quote:

Originally Posted by GiantGnome
Hey Stuart, please icq me if you can. 172768566

uh oh.. I get the feeling I'll be doing php support in the very near future :winkwink:

ICQ sent :glugglug


All times are GMT -7. The time now is 06:35 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123