Tutorial on using PHP strrpos explode is_array functions

Source: Internet
Author: User
Tags explode


This article is about a simple use of strrpos explode is_array and other functions Oh,

About Strrpos judgment
Character Strrpos ($j _rs->selectedjob, '-') if there is a character to be checked


About Explode judgment
In what form does the character open the array = explode ('-', $j _rs->selectedjob);

Is_array
Determines whether the current parameter is an array Is_array ($array)

$ja = ' 0 ';
$JB = ' 0 ';

if (Strrpos ($j _rs->selectedjob, '-'))//with 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.