Jshee
Jshee

Reputation: 2686

Php Error On Outputting DB Values

{echo "<option value="."$row3['cID']>" .$row3['prefix']." ".$row3['code']."</option>";}

Gives me the error:

Syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING

For some reason the editor isn't coming up.

Upvotes: 0

Views: 47

Answers (2)

Mel
Mel

Reputation: 6167

echo "<option value="."$row3['cID']>" .$row3['prefix']." ".

Switch the double quote and dot at the end.

Upvotes: 0

J&#252;rgen Thelen
J&#252;rgen Thelen

Reputation: 12727

Try

echo "<option value=". $row3['cID'] . ">" .$row3['prefix']." ".$row3['code']."</option>";

Upvotes: 2

Related Questions