// Pre-load settings array with management settings as default using the list above
$settings = array();
reset($GLOBALS['showOpts']);
- while (list($key, $val) = each($GLOBALS['showOpts'])) {
+ foreach ( $GLOBALS['showOpts'] as $key => $val ) {
$settings[$val] = $this->config['settings'][$val];
}
$regionsRequested = explode( ',', $actionData['request']['region-search'] );
// Check for numeric ID's only
- while ( list( $k, $v ) = each( $regionsRequested ) ) {
+ foreach ( $regionsRequested as $k => $v ) {
if ( preg_match( '/^[0-9]*$/', trim( $v ) && $v > 0 ) ) {
$regions[] = ( $v - 0 );
}
$regionsRequested = explode( ',', $actionData['request']['county-search'] );
// Check for numeric ID's only
- while ( list( $k, $v ) = each( $regionsRequested ) ) {
+
+ foreach ( $regionsRequested as $k => $v ) {
if ( preg_match( '/^[0-9]*$/', trim( $v ) && $v > 0 ) ) {
$counties[] = ( $v - 0 );
}
$citiesRequested = explode( ',', $actionData['request']['city-search'] );
// Check for numeric ID's only
- while ( list( $k, $v ) = each( $citiesRequested ) ) {
+ foreach ( $citiesRequested as $k => $v ) {
if ( preg_match( '/^[0-9]*$/', trim( $v ) && $v > 0 ) ) {
$cities[] = ( $v - 0 );
}
$typesRequested = explode(',', $actionData['request']['type']);
// Check for numeric IDs only
- while (list($k, $v) = each($typesRequested)) {
+ foreach ( $typesRequested as $k => $v ) {
// If it's just numeric - note Explode returns an array element with value = 0 if no string.
if (preg_match('/^[0-9]*$/', trim($v)) && $v > 0) {
$catsRequested = explode(',', $actionData['request']['category']);
// Check for numeric IDs only
- while (list($k, $v) = each($catsRequested)) {
+ foreach ( $catsRequested as $k => $v ) {
// If it's just numeric - note Explode returns an array element with value = 0 if no string.
if (preg_match('/^[0-9]*$/', trim($v)) && $v > 0) {
$catsRequested = explode('|', $actionData['request']['category-name']);
// Check for numeric or text selection of categories
- while (list($k, $v) = each($catsRequested)) {
+ foreach ( $catsRequested as $k => $v ) {
$vStripped = html_entity_decode(stripslashes(trim($v)));
// Add ['default'] value to all categories
reset($categoryData);
- while (list($k, $v) = each($categoryData)) {
+ foreach ( $categoryData as $k => $v ) {
$categoryData[$k]['default'] = false;
}
*/
$parentSelected = false;
reset($categoryData);
- while (list($k, $v) = each($categoryData)) {
+ foreach ( $categoryData as $k => $v ) {
// If this is a parent, then clear parent selected
if ($v['parent_id'] != $parentSelected) {