I have a if statement evaluating 2 (numbers 1 and 0);
$output['mustHaveButtonText'] = ($dealer->mustHave == 0) ? 'Add to Must Have' : 'Remove From Must Have';
What I want is to assign the number to a string then display the sting instead of the number,
like
0 = "Must Have";
1 = "Must Not Have";
If I understand correctly, what you want to have is an array, like the following:
then you can write:
That way, even if you need the text multiple times, you need to define it only once, but can use it multiple times.