打破那个字符串 [英] Breaking that string

查看:48
本文介绍了打破那个字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以帮助我。


我设计了一个表单,其中有一个文本框和一个提交按钮。

用户可以输入在一个可以长度可变的消息中并包含空格。

我想把这个字符串分成单个字符而且我想在每个字符前后放置一个字符串

ie


假设我输入的文字为1234

然后我必须得到输出

我喜欢1个女孩( s)我爱2个女孩

等等。任何人都可以帮助我!

Can any one help me out.

I have designed a form in which I have one text box and a submit button.
User can type in a message which can be of variable length and include spaces.
I want to break this string into INDIVIDUAL CHARACTERS And also I want to place a string before and after every character
i.e

suppose I have entered the text as 1234
then I must get the output as
I love 1 girl(s) I love 2 girl(s)
and so on .can any one help me out !

推荐答案

类似的东西?


[php]

<?php
something like that ?

[php]
<?php


str =


_POST [''message''];
_POST[''message''];


这篇关于打破那个字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆