Ron Piggott
2013-09-17 19:38:22 UTC
I am wanting to establish a default sort by preference when the user hasnât specified one. I setup to test this with:
<?php
if ( !is_set( $sort_by_preference ) ) {
$sort_by_preference = "government_wording";
}
?>
But I am receiving a Notice error:
Notice: Undefined variable: sort_by_preference in GIFI_codes.php on line 11- Line 11 is âif ( !is_set( $sort_by_preference ) ) {âWhat is the correct way to test this without triggering a Notice error?Ron
Ron Piggott
www.TheVerseOfTheDay.info
<?php
if ( !is_set( $sort_by_preference ) ) {
$sort_by_preference = "government_wording";
}
?>
But I am receiving a Notice error:
Notice: Undefined variable: sort_by_preference in GIFI_codes.php on line 11- Line 11 is âif ( !is_set( $sort_by_preference ) ) {âWhat is the correct way to test this without triggering a Notice error?Ron
Ron Piggott
www.TheVerseOfTheDay.info