I have two fields in one table.
One being named Junior with two outputs of either yes or no.
The other being named Result with a string as a sentence saying..Here is the result
If Junior is equal to Yes then I want to add ‘(Jr.)’ to the end of the string..saying
‘Here is the result (Jr.)’
How would I accomplish this?
$bio[‘results’] is my array for my query.
if ($bio['results']['Junior'] == 'Yes' {
what would go here?
});
EDIT: I want concatenate (‘Jr’) to the end of my string ‘Here is the result’
resulting in ‘Here is the result (Jr.)’ Sorry for the typo.
I would appreciate any help! Thanks!
I am quite confident, I can guess what you want. 🙂
If you want to write the result string back into the database, you will need sql.
For example (because you were asking):
assuming, you wrote the string into the variable $result (it’s cleaner).
Since I don’t know your database system or table name, I used aliases for the functions.