Solution -- where to go Net test question ---- is this a Chinese word segmentation?

Source: Internet
Author: User
Solution -- where to go Net test questions ---- is this a Chinese word segmentation? where to go Net test a Chinese word segmentation program

Participated in the written examination of CEN
Asp. php. jsp. javascript is not limited to converting it into javascript. jsp. php. asp
It refers to the character string entered by the user (which contains several characters separated by "."). You write a program to implement the separation of these "." and reverse the original sentence.


Reply to discussion (solution)

It seems to be converted into an array, and then in reverse order.

The question is how to separate? The character between two vertices is converted into an array unit. Solution

It seems to be converted into an array, and then in reverse order.
The question is how to separate? The character between two vertices is converted into an array unit.

$s = 'asp.php.jsp.javascript';echo join('.', array_reverse(explode('.', $s)));
Javascript. jsp. php. asp

$s = 'asp.php.jsp.javascript';echo join('.', array_reverse(explode('.', $s)));
Javascript. jsp. php. asp
It seems that I still have to learn php! Thank you!

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.