i am new to php coding and i am getting an error please help me to solve this
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' <option<?php if ( get_settings( $value['id'] ) == $option) { echo ‘ selected="selected" } elseif ($option == $value['std']) { echo ‘ selected="selected" } ?><?php echo $option; ?></option>
justzamir 0 Newbie Poster
Recommended Answers
Jump to Postyou alsso used a backtick ` in stead of a single quote '
Jump to Postok getting same error
Compare with the previous example. Am positive you can fix this yourself. Look at the quotes.
Jump to PostYou need to escape quotes when you nest the same types, e.g.
echo "He said \"Hello\" to me";
Jump to Post@just
line 7 is mashed.Also indent your code properly - it's difficult to follow.
All 14 Replies
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
justzamir 0 Newbie Poster
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
pzuurveen 90 Posting Whiz in Training
justzamir 0 Newbie Poster
pritaeas 2,211 ¯\_(ツ)_/¯ Moderator Featured Poster
justzamir 0 Newbie Poster

diafol
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
justzamir 0 Newbie Poster
asprin 14 Newbie Poster
justzamir 0 Newbie Poster

diafol
justzamir 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.