|
[x]
Posted via EE Mobile
|
|
| Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again. |
|
|
|
|
Asked by Liam_H in PHP Scripting Language
Hi all.
I have a website that I am editing and improving, with a specific area causing me problems. I have a div section on a webpage that I want to display one thing if the information is in the database, and if not something else. The code I have is below, but I get an error stating it's not expecting the else statement.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
|
echo "<div class='game_info' id='game_info'>";
echo "<div class='more_holder' id='more_holder'>";
// headline only section from here
// see if any rows were returned from the headline only query
if (mysql_num_rows($result) > 0) {
// if rows are returned
while($row = mysql_fetch_assoc($result)) {
echo stripslashes("Score: ".$row['Score']."%<br>");
}
else {
echo {
"morning";
}
}
echo "</div>";
}
|
20091111-EE-VQP-89 - Hierarchy / EE_QW_3_20080625