/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING o

This error code:
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:xxxxx.php on line 112

Line 112 is the last one below

[code=php]<?
$i=0;
$result = mysql_query(“SELECT * FROM rosterlist ORDER BY name”) or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
?>
<p class=MsoNormal><span style=”font-family:Verdana;background:silver”><? echo $row[‘name’]; ?></span><BR>
<? echo “Member #”.$row[‘memberno’]; ?><BR>
<? echo $row[‘Address1’]; ?><BR>
<? echo $row[‘Address2’]; ?><BR>
<? if ($row[‘Address3’] <> “”){
echo $row[‘Address3’]; ?><BR>
<? } else {} ?>

<? if ($row[‘Phone’] <> “”){
echo “Phone: ” .$row[‘Phone’]; ?><BR>
<?} else {} ?>

<? echo (!empty($row[’email1′])) ? “<class=MsoNormal>Email: <a href=”mailto:{$row[’email1′]}”>$row[’email1′]</a><br>n” : “”; ?>[/code]

Any idea why? This line worked OK when I read the table row by row and used an array variable instead of the $row approach.

thanks –Larry

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@pcthugAug 31.2006 — Try replacing line 112 with:[code=php]<? echo (!empty($row['email1'])) ? "<class=MsoNormal>Email: <a href="mailto:{$row['email1']}">{$row['email1']}</a><br>n" : ""; ?>[/code]
Copy linkTweet thisAlerts:
@LarrySauthorAug 31.2006 — That took care of it!

--Thanks
Copy linkTweet thisAlerts:
@pcthugAug 31.2006 — No Problem.
×

Success!

Help @LarryS spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...