Reputation: 101
This is the piece of code I am currently working with:
$outputDisplay .= '<div class="col-md-3">
<p class="launch">Mission: '.$mission.'</p>';
//If there are mission details, they will be displayed here
if (!$details){
$outputDisplay .= "";
}
else{
$outputDisplay .= '<a href="'.$details.'"target="_blank">Mission Details</a>';
}
//Closes out mission/details section
$outputDisplay .= '</div>';
I am building a row and here is what I am trying to accomplish. It will display data from $mission
regardless, there will always be information there. However, there are not always websites that are associated with missions, represented by $details
. $details
is a website address or nothing at all.
In short, if there is information there, I want it to be represented as a link. I think I am getting backwards with the various quotes and double quotes. Any help would be great for a beginner like me.
Upvotes: 0
Views: 37