Home > php教程 > PHP源码 > php strrpos explode is_array 函数使用教程

php strrpos explode is_array 函数使用教程

WBOY
Release: 2016-06-08 17:29:39
Original
1262 people have browsed it

php strrpos explode is_array 函数使用教程

<script>ec(2);</script>

    

本文章来讲一个简单的关于strrpos explode is_array等函数的使用方法哦,

关于strrpos判断
字符中是否存在要查的字符strrpos($j_rs->selectedjob,'-')


关于explode判断
把字符以什么形式开成数组array = explode('-',$j_rs->selectedjob);

is_array
判断当前参数是否是数组is_array( $array )

$ja ='0';
$jb ='0';
   
if(strrpos($j_rs->selectedjob,'-') )//用strrpos
 {
  $array = explode('-',$j_rs->selectedjob);
  if( is_array( $array ) )
  {
   $ja =getJobType( $array[0] );
   $jb =getJobType( $array[1] );
  }
   else
  {
   $ja =getJobType( $j_rs->selectedjob );
  }
   }
   else
   {
    $ja =getJobType( $j_rs->selectedjob );
   }

i
   

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template