i know this is really obvious but i just don't know what I'm missing.
$option[] = "<option value='user' selected=' " . ($row[5]=='admin') ? echo 'selected' : null. "'>user </option>";`
thanks
Try this:
$option[] = '<option value="user" . ($row[5]=='admin' ? 'selected' : '') . '>user </option>';`
Three differences from your code:
echo, which isn't necessary in a concatenation operation.echo there.
'don't have to be escaped in a double quote string.