/    Sign up×
Community /Pin to ProfileBookmark

Help me Parse error: syntax error, unexpected $end in error

Parse error: syntax error, unexpected $end in C:xampphtdocstic2211test2.php on line 21

<?php
ob_start();
include (“connection.php”);
?>
<html>
<head>
</head>
<body>
<ul>
<?php
$result= mysql_query(“select * from bulletin”);
while($row=mysql_fetch_assoc($result))
{
?>

<li class=”bullentin”>
<?php echo $row[“bulDesc”]?></li>
}
</ul>
</body>
</html>

to post a comment
PHP

6 Comments(s)

Copy linkTweet thisAlerts:
@bionoidDec 18.2011 — You were missing PHP tags around your closing while brace "}"

[CODE]<?php

ob_start();
include ("connection.php");

?>
<html>
<head>
</head>
<body>
<ul>
<?php

$result = mysql_query("select * from bulletin");
while($row = mysql_fetch_assoc($result)) {

?>
<li class="bullentin"><?php echo $row["bulDesc"]; ?></li>
[COLOR="Red"]<?php

}

?>[/COLOR]
</ul>
</body>
</html>[/CODE]
Copy linkTweet thisAlerts:
@dangerousprinceDec 18.2011 — Also, clean up your SQL:

[code=html]$result = mysql_query("SELECT * FROM bulletin");[/code]

I used to write like that and when you start using different words, it really mucks up the SQL. Think of it as grammar.
Copy linkTweet thisAlerts:
@bionoidDec 18.2011 — Also, clean up your SQL:

[code=html]$result = mysql_query("SELECT * FROM bulletin");[/code]

I used to write like that and when you start using different words, it really mucks up the SQL. Think of it as grammar.[/QUOTE]


If it's syntax your suggesting, I would have made the statement more specific to the data being extracted...

[CODE]$result = mysql_query('SELECT b.bulDesc FROM bulletin b');[/CODE]
Copy linkTweet thisAlerts:
@RachelGomezSep 07.2022 — Parentheses are an important form of punctuation for many programming languages. It helps organize code, execute strings, and perform functions. Sometimes when a beginner is writing code, it is easy for them to forget how many parentheses have been used or if they are matched up correctly.

If one end of the parentheses is missing in the code, then it won’t be compiled. Furthermore, if the parentheses aren’t matched up correctly, then the code may perform the function incorrectly.

How to Fix It: If a syntax error appears, check to make sure that the parentheses are matched up correctly. If one end is missing or lined up incorrectly, then type in the correction and check to make sure that the code can be compiled.

Keeping the code as organized as possible also helps. If the parentheses are lined up or easy to spot, then a coder can keep track of them much more easily and not run into errors.

Greeting,

Rachel Gomez
Copy linkTweet thisAlerts:
@sibertSep 07.2022 — 11 YEARS LATER - Please do not open old threads! Closing...
Copy linkTweet thisAlerts:
@sibertSep 07.2022 — {"locked":true}
×

Success!

Help @nraink7 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.29,
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,
)...