PHP中的字符串操作功能是比较多的,重要的有以下这些:
(1)echo,print,printf,sprintf
前两个函数是输出字符串.字符串中如果有变量名则被替换成其值. 后两个函数类似于C的同名函数.
(2)strchr,strlen,strtok,strrchr,strrev,strstr,strtolower, strtoupper,substr,ucfirst
这些是常用的字符串操作函数,有些和C中的同名函数意义完全一致.
strrev是把一个字符串翻转.
strtolower和strtoupper的意思应该不用解释了.
ucfirst是把字符串的第一个字符变成大写.
substr是返回字符串的一个子串,用法是:substr(字符串,头,长度).
头位置是 从0算起的.如果是负数,则是从尾部向前数的意思.
(3)Chr,Ord
类似于C的同名函数.
(4)explode,implode,join
这些是和数组有关的函数.
explode(字符串,分割符)返回一个将字符串在分割符处分开所产生的数组.
implode(数组,分割符)返回一个将数组各元素之间插上分割符而成的字符串.
join与implode意义相同.
(5)Chop
去掉字符串尾部的空白.
(6)htmlspecialchars
将字符串中的HTML特殊字符换成它们的名字,例如"< "变成"<".
(7)nl2br
在字符串中的每一个回车前面加上"< BR>".
(8)AddSlashes,StripSlashes
分别给字符串中需要加上""才能用于数据库查询的字符加上和去掉"".
(9)parse_str
将"name1=value1&name2=value2&..."类型的字符串分析成一些变量.
例如:
parse_str("a=1&b=2");
生成$a与$b两个变量,值分别为1,2. 如果有两对名字/值的名字部分相同,则后一个的值覆盖前一个的. 如果这两对的名字尾部都有"",例如"a=1&a=2",则生成数组$a,两个元素分别为1,2
(1)echo,print,printf,sprintf
前两个函数是输出字符串.字符串中如果有变量名则被替换成其值. 后两个函数类似于C的同名函数.
(2)strchr,strlen,strtok,strrchr,strrev,strstr,strtolower, strtoupper,substr,ucfirst
这些是常用的字符串操作函数,有些和C中的同名函数意义完全一致.
strrev是把一个字符串翻转.
strtolower和strtoupper的意思应该不用解释了.
ucfirst是把字符串的第一个字符变成大写.
substr是返回字符串的一个子串,用法是:substr(字符串,头,长度).
头位置是 从0算起的.如果是负数,则是从尾部向前数的意思.
(3)Chr,Ord
类似于C的同名函数.
(4)explode,implode,join
这些是和数组有关的函数.
explode(字符串,分割符)返回一个将字符串在分割符处分开所产生的数组.
implode(数组,分割符)返回一个将数组各元素之间插上分割符而成的字符串.
join与implode意义相同.
(5)Chop
去掉字符串尾部的空白.
(6)htmlspecialchars
将字符串中的HTML特殊字符换成它们的名字,例如"< "变成"<".
(7)nl2br
在字符串中的每一个回车前面加上"< BR>".
(8)AddSlashes,StripSlashes
分别给字符串中需要加上""才能用于数据库查询的字符加上和去掉"".
(9)parse_str
将"name1=value1&name2=value2&..."类型的字符串分析成一些变量.
例如:
parse_str("a=1&b=2");
生成$a与$b两个变量,值分别为1,2. 如果有两对名字/值的名字部分相同,则后一个的值覆盖前一个的. 如果这两对的名字尾部都有"",例如"a=1&a=2",则生成数组$a,两个元素分别为1,2
coach factory outlet
2012-5-17 10:40
Today, following half a century, mentor leather-bases coach factory outlet continues to be the delicate craft of leather-based master is accountable for,Would you like to meet more friends, or go with the times? If yes, coach factory online is opening welcome doors to you.in the market you definitely can find various colorways that are designed in as well as the high quality that applied in. For most of you would like to come. So just come to our coach factory outlet online store to choose one.
louis vuitton sale
2012-5-17 10:40
Louis Vuitton belt at louis vuitton sale is one kind of fashion accessory with high cost performance among the Louis Vuitton accessories.Offering quality LV products with favorable prices, louis vuitton outlet store is at your service. Hurry up, or you can not seize the chance.in fact, louis vuitton is one of the most famous fashion design master.he opened the fist suitcase shop called after his name.
coach outlet,
2012-5-17 10:40
Remember the coach outlet provide coach bags which won't be deteriorated into its overall styles by any means. It will maintain its looks, colors, and uniqueness for long time.coach outlet store online has been voted by Hour Detroit magazine readers as the Best of Detroit in their 12th annual readers'poll.Lots of women like which usually amount normally include a coach outlet online ,it provides coziness to many girls that don't even think it is a great bushel of great interest directly to them.
coach outlet online
2012-5-17 10:41
I heard of coach outlet online through the advertisement when I was shopping. And now I often brow the webpage and buy Coach bags online.It is a symbol regarding position not to mention nature.Here I would like to launch a excellent bags pertaining to business men.Which may be coach outlet store.coach outlet has always been simple,durable style features to win consumers.The products are more flexible,with easy bleaching,wear characteristics,and simply use a damp cloth.
Coach Outlet Online
2012-5-18 10:13
to obtain Coach Outlet Online in Hainan is amongst the brand new darling from residential holiday makers.He has served as Chairman and Chief Executive Officer of Coach since November 1995. He has served as a member of Coach Outlet Board of Directors since June 1, 2000, the date of incorporation.
Coach Outlet Online
2012-5-18 10:13
to obtain Coach Outlet Online in Hainan is amongst the brand new darling from residential holiday makers.He has served as Chairman and Chief Executive Officer of Coach since November 1995. He has served as a member of Coach Outlet Board of Directors since June 1, 2000, the date of incorporation.
Coach Outlet
2012-5-18 10:38
Coach Outlet was founded in 1941, in a loft in New York City.as a partnership called the Gail Manufacturing Company. Gail Manufacturing Company began as a family-owned business, with six leatherworkers who made small leather goods, such as wallets and handbags.Coach Outlet Online Store guarantee that all the coach handbags offered are own high quality. In addition , all of them are sold at an unexpected low price.If you want to purchase, just visit their website.
Coach Outlet
2012-5-18 10:45
Five years later in 1985, the Cahns decided to sell Coach Outlet after determining that none of their three children had any desire to take over the family leatherware business . Coach was then sold to Sara Lee Corporation for $30 million dollars.electric, diesel and mainline electric multiple units (EMU, DMU, MEMU), metro Coach Outlet Canada and Diesel Electric Tower Cars (DETC), Accident Relief Medical Vans (ARMV), Inspection Cars (RA), Fuel Test Cars, Track Recording Cars, the latest coaches are for the Deccan Odyssey .
Louis Vuitton
2012-5-18 10:50
During this period, Louis Vuitton incorporated its leather into most of its products, ranging from small purses and wallets to larger pieces of luggage.To emphasize Jacobs's fashionable volte face, Kate Moss-last season's saucy Louis Vuitton UK dominatrix was recast for spring as the ballerina on that music box in a gleaming white baby doll frock and Barbie white stilettos.
Louis Vuitton UK
2012-5-18 10:56
This Louis Vuitton UK for sale belongs to the sounding just what are termed as Louis Vuitton vintage best sellers, many other products and services for the reason that range appearing companies.In 1983, the company joined with America's Cup to form the Louis Vuitton Cup, a preliminary competition (known as an eliminatory regatta) for the yacht race.
xujie777
2012-5-18 15:38
We aim to make all our customers satisfy with our products. You will find a variety of Men's fashion louis vuitton uk, fashion Women's cheap Louis Vuitton bags in our store at affordable price.Thinking of interesting ways to cost a milestone birthday? louis vuitton online shop had one of the most distinctive distinctive celebrations.bakery along with living room operated by means of about three moment louis vuitton online Most effective Pastry Chef’s of the year Rammy Nominee Chef’s.
xujie777
2012-5-18 15:39
The choices are likely to be basically countless seeing that louis vuitton outlet occurs with the help of completely new and also incredible concepts once in a while.Louis vuitton Wholesale Monogram Canvas HandbagsLouis Vuitton Collection Beach Handbags louis vuitton bags outlet Damier Canvas HandbagsLouis vuitton Mahina HandbagsLouis Vuitton Monogram Mini Lin HandbagsLouis Vuitton Monogram Multicolore HandbagsLouis vuitton Monogram Vernis HandbagsLouis Vuitton Wholesale Epi Leather HandbagsLouis Vuitton For Men HandbagsLouis Vuitton Damier Canvas WalletsLouis Vuitton Epi Leather WalletsLouis Vuitton Monogram Canvas WalletsLouis Vuitton Monogram Vernis WalleLouis Vuitton ShoesLouis Vuitton Men wallets.As the Authentic Louis Vuitton are so high-priced, so came the louis vuitton handbags outlet.
xujie777
2012-5-18 15:39
coach outlet has become a popular shopping experience for consumers around the world, and a desirable distribution channel for manufacturer's and retailers.Getting your hands on coach outlet store online can be a hefty investment of hundreds of dollars.But do not despair,the Coach Outlet store could be the answer to your prayers.coach outlet online is your smart choice when you want to get the discount Coach accessory. You can find the exact Coach Bags and other accessory you want at a low price that's right for you. My dear friends, let the coach outlet online pave your way into the world of high fashion with their ultimate fashion factory.
Christian Louboutin
2012-5-18 17:09
christian louboutin have own characteristic designs. The beautiful crystals have added the magical finishing touch to countless bridal gowns. Just get some for yourself. The first Men's Boutique, christian louboutin uk Boutique Homme on Rue Jean-Jacques Rousseau in Paris, opened in the summer of 2012.
Louis Vuitton UK
2012-5-18 17:09
Cheap louis vuitton uk wholesale offers a variety of options to satisfy your needs. Some new ones even has fashionable styles fold over flap to disguise the snap closure and a draw string is added for a convenient closure. Louis vuitton outlet online just like a person who want to show himself in front of other people, because he is confident enough, he can attain the respect of other people.
CoachOutlet
2012-5-18 17:09
coach outlet has become a popular shopping experience for consumers around the world, and a desirable distribution channel for manufacturer's and retailers. Coach outlet online develops very quickly because it runs by its own special way and it contents the customers greatly.
Air Jordan
2012-5-18 17:09
Thank you for shopping in our store. We are a reliable online jordan bags seller, specialist in providing numbers of new air jordan bags at amazing price . If you need practical, fashionable and well-known nike dunks, you can consider to choosing on the nike Outlet. Its nice and popular design will make you feel a sense of fresh air.
Nike Air Max
2012-5-18 17:09
This nike air max for sale belongs to the sounding just what are termed as nike air vintage best sellers, many other products and services for the reason that range appearing companies the actual nike air Galliera, plus the nike air outlet monogram selection. nike dunks are made of high leather materials which can be durable and fashionable.They will make you become the focus in the streets or audience.
xujie222
2012-5-21 10:56
Our online store offers you discounted Designer louis vuitton replica wallet at present. You could find them in desirable quality and price. If you don't mind high class louis vuitton uk, have a good time here.louis vuitton Store Online Handbags can also bring great accuracy as well as practical applicability and fashionable.Have you ever dreamed of being as charming as Madonna? Have you ever thought of becoming an envy of all your friends? If so, come to louis vuitton outlet.<br/>
xujie555
2012-5-21 13:20
coach factory outlet uses graceful accessories to match the classical logo of coach, which is the best combination of coach. The handmade coach products?can make you more charming and graceful.coach factory online provides people many coach goods. If you wish to snatch the coach handbag, then this best method is made for that you like for coach discount.coach factory outlet online is a fashion brand to ensure its quality. With designer coach shoulder bags, you will always attract people's attention. The bags will emphasize your personal style and taste.<br/>
分页: 1/2 1 2