‘if variable equals variable echo this’ causing white screen

Basically I have a select box with the values from a dataset, what I need to do is say select the one that is equal to the value of another field in the dataset. Here is the code, many thanks in advance for your help :-)

<option value="<?php echo $row_menucats1['id'] ?> " 

<?php 

$cats1 = $row_menucats1['id'];
$cats2 = $row_options['sub_cat_id_link'];

if ($cats1 == '$cats2') { 

echo 'selected' 
}

?> >

Leave a Reply

*

Hire Me
Follow Me!
Search
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.
Categories