Quote:
Originally Posted by Publisher Bucks
It gets opened at the top of the page:
Then presently, I'm using an echo to call a specific field of data from the table:
|
Ok so the sponsor column has already been extracted into $sponsor.
Instead of printing $name lets print $string which we will add strong tags to in case $sponsor is set to "Yes".
PHP Code:
$string = ( $sponsor == 'Yes' ) ? "<strong>$name</strong>" : $name;
echo $string;
You could also use a full if / else statement together with $name only but I think it's less fancy for some reason.
Though if you want to do more logic in case $sponsor is set to Yes than this would be a better way to go.
PHP Code:
if ( $sponsor == 'Yes' ) {
echo "<strong>$name</strong>";
}
else {
echo $name;
}