Avatar of thechase22
thechase22Flag for United Kingdom of Great Britain and Northern Ireland

asked on 

The famous Parse error: parse error, unexpected T_STRING

Ok so I got this script thing installed on my site, and the line that I get this error is:

$nrsubscribed.="<font class="title"><center>"._ESOLUTIONNOTSUBSCRIBED."</font></center><br><br>";

Just off hand, can anyone see anything in there missing anything? Installation may be wrong, But Im just curious to see if anything is missing in here?

let me know

Cheers
PHP

Avatar of undefined
Last Comment
Richard Quadling
ASKER CERTIFIED SOLUTION
Avatar of Richard Quadling
Richard Quadling
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
The END_SOME_MARKER can be anything sensible. I have always used END_xxxx where xxxx is the type of text (HTML, CSS, JS, SQL) or the closing tag if a complicated tag (END_HTML_OPTION, END_HTML_SELECT, etc).

You cannot embed function calls or constants in this way unfortunately. You will need to create normal variables for them.

Also, the HTML is way bad!!! Opening and closing tags out of sequence...

Try ...

$_ESOLUTIONNOTSUBSCRIBED = _ESOLUTIONNOTSUBSCRIBED;
$nrsubscribed.= <<< END_SOME_MARKER
<font class="title"><center>$_ESOLUTIONNOTSUBSCRIBED</center></font><br /><br />
END_SOME_MARKER;

or

$nrsubscribed.= "<font class=\"title\"><center>" . _ESOLUTIONNOTSUBSCRIBED . "</center></font><br /><br />"'

Oops. Typo...

$nrsubscribed.= "<font class=\"title\"><center>" . _ESOLUTIONNOTSUBSCRIBED . "</center></font><br /><br />";

; and not ' on the end of the line.
Avatar of thechase22
thechase22
Flag of United Kingdom of Great Britain and Northern Ireland image

ASKER

I think you was more or less on track, so ill give the points

Thanks for your time :)
What do you mean? More or less!? (<grin />)

Ah.

The TString the error is referring to is the word 'title'

After the opening " for class= (which is actually interpreted as the closing "), the next thing would be either a . to append more text or a ; to terminate the statement.


Anyway.

Ta!
PHP
PHP

PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.

125K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo