/    Sign up×
Community /Pin to ProfileBookmark

now i get … Parse error: syntax error, unexpected ‘{‘, expecting ‘,’ or ‘;’ in /u/internet/com/dickeyjohn/test.php on line 76

and

[code=php] <?php do { ?>
<option value=”<?=$row_rs_industry[‘industry_id’];?>”<?=(isset($_GET[‘industry_id’]) && $_GET[‘industry_id’] == $row_rs_industry[‘industry_id’]) { ?> selected<?php } ?>><?=$row_rs_industry[‘industry_name’];?></option>[/code]

thats the line of code

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@NyfaelSep 21.2006 — Mm, not sure how you were trying to do what you wanted, but if I'm correct, this code is the equivilent and should work (I can't test because that's only part of some code, but this should work):

[code=php]
<?php
if (isset($_GET['industry_id']) == true && $_GET['industry_id'] == $row_rs_industry['industry_id'])
{
$option = " selected";
}
?>
<option value="<? echo $row_rs_industry['industry_id']; ?>"<? echo $option; ?>><? echo $row_rs_industry['industry_name']; ?></option>
[/code]


You can put the shortcutes (<?=$variabe?>) back in if you like, but I use echo just to make it more clear.

Sincerely,

Kerry
×

Success!

Help @Codeman0013 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.18,
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,
)...