2017-03-02 152 views
0

我已經介紹了這種簡單的if-else使用高級自定義字段來查看值是否被檢查,但每當我在代碼中引入它時,頁面顯示它當前無法處理請求。acf頁面無法處理請求

     <?php 
          if(in_array('strategy', get_field('services_provided'))){ 
          echo "strategy"; 
          }else if(in_array('design', get_field('services_provided'))){ 
          echo "design"; 
          }else if{in_array('dev ', get_field('services_provided')){ 
          echo "dev"; 
          }else{ 
          echo "error"; 
          } 

         ?> 

回答

0

有錯字的代碼,

<?php 
    if(in_array('strategy', get_field('services_provided'))){ 
     echo "strategy"; 
    } 
    else if(in_array('design', get_field('services_provided'))){ 
     echo "design"; 
    }else if(in_array('dev', get_field('services_provided'))){ 
     echo "dev"; 
    }else{ 
     echo "error"; 
    } 
?>