vendredi 27 février 2015

Simple PHP string check not working

I hate to even post this question, but I can't seem to get this to work for me. I can echo $the_page directly before the if statement, but yet the if statement always comes up "else". Any ideas? Thank you in advance.



<?php if(is_page('sp')){$the_page = 1;} else { };

if($the_page === 1) { ?>
<script type="text/javascript">
jQuery(document).ready(function($) {
$("#form-interest option:first:contains('---')").html('Área De Interés*:');
});
</script>
<?php } else { ?>
<script type="text/javascript">
jQuery(document).ready(function($) {
$("#form-interest option:first:contains('---')").html('Area of Interest*:');
});
</script>
<?php } ?>

Aucun commentaire:

Enregistrer un commentaire