I have this code, there is no selected yet while($datas=mysql_fetch_array($rs)){ $data .= "<option value='$datas[product]' ">$datas[product]</option>";
[PHP] Set selected option of select tag & fetch_array
5
I have this code, there is no selected yet
I want to set selected option, already tried this in red, but its selected all value
then tried this in red
the result is getting error message like this, maybe its still not correct or cant use php code inside it :
Parse error: syntax error, unexpected T_IF in /home/username/public_html/test.php on line 29
tried put echo, just for test
the result is getting error message like this, so event cant print simple echo inside it :
Parse error: syntax error, unexpected T_ECHO in /home/username/public_html/test.php on line 29
please help share your knowledge guys, what is the right code to set selected in above code
GBU for all the answering
I want to set selected option, already tried this in red, but its selected all value
then tried this in red
the result is getting error message like this, maybe its still not correct or cant use php code inside it :
Parse error: syntax error, unexpected T_IF in /home/username/public_html/test.php on line 29
tried put echo, just for test
the result is getting error message like this, so event cant print simple echo inside it :
Parse error: syntax error, unexpected T_ECHO in /home/username/public_html/test.php on line 29
please help share your knowledge guys, what is the right code to set selected in above code
GBU for all the answering
- BDazzler
- [ 1 ] Thanks
- premiumwebtechnologies
- [ 1 ] Thanks
- emptee
Next Topics on Trending Feed
-
5