A php query Problem

Source: Internet
Author: User
$ A & #039; fdsfd4352 Lin fengjiao arongsuo danfu of pepper & #039; $ B & #039; Su & #039; how can I find his 12th $ a = 'lin fengjiao arongsuo danfu shares fds of spicy fdsfd4352 pepper ';
$ B = 'su' how can I find that he has 12th

Reply content:

$ A = 'Spicy fdsfd4352 Pepper's Lin fengjiao arongsuo danfu shares fds ';
$ B = 'su' how can I find that he has 12th

The primary answer is 12. Based on the contributions of the above students, correct the answer:

$ A = 'fdsfd4352 the fds of Lin fengjiao arongsuo danfu of pepper '; $ B = 'sur'; $ char_pos = strpos ($ a, $ B ); // 15 // search for the Chinese location. The mb * function mb_internal_encoding ('utf-8') must be combined; $ pos = mb_strpos ($ a, $ B) + 1; // 12

$ A = 'fdsfd4352 Lin fengjiao arongsuo danfu fds of pepper '; $ B = 'sur'; $ pos = strpos ($ a, $ B );

Strpos ($ a, $ B );

Mb _ to obtain the natural Length

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.