I'm working on a tool to query a government database or information. Sam.gov actually. They have a public API and up until now everything has been going smooth but I ran into an issue with an array that returns a 1 instead of the word "Yes" That I'd like it to.
http://gsa.github.io/sam_api/sam/fields.html (This is the API documentation)
Here is the code that I can't figure out...
foreach($decoded_results['sam_data']['registration']['naics'] as $naics){
echo '<strong>Is Primary: </strong>'.$naics['isPrimary'].'</br>';
echo '<strong>Naics Code: </strong>'.$naics['naicsCode'].'</br>';
echo '<strong>Naics Name: </strong>'.$naics['naicsName'].'</br>';
}
I need the isprimary to return a Yes or a No instead of nothing of a number 1, anyone have any solutions?
'.$naics['isPrimary'].'to'. ($naics['isPrimary'] == true)?'yes':'no' .'echo '<strong>Is Primary: </strong>' . ($naics['isPrimary'] ? 'yes' : 'no') .'</br>';