Current location: Hot Scripts Forums » Programming Languages » PHP » Start trim from begining of String and end at a perticular word


Start trim from begining of String and end at a perticular word

Reply
  #1 (permalink)  
Old 07-12-09, 07:47 AM
phpssp phpssp is offline
New Member
 
Join Date: Jul 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Start trim from begining of String and end at a perticular word

How to use php preg_replace to start trim operation from begining of String and end at a perticular word?

For example I want to use PHP preg_repalce to display "is Paris" from a sentance "The capital of France is Paris".

(I know that i have to trim upto "France" from begining of sentance ).

Thanks in advance
Reply With Quote
  #2 (permalink)  
Old 07-12-09, 08:10 AM
ruteckycs's Avatar
ruteckycs ruteckycs is offline
Coding Addict
 
Join Date: Jul 2009
Posts: 377
Thanks: 6
Thanked 10 Times in 10 Posts
You could brake the sentence down into individual words, store each word in an array and then just ignore the variables before the starting word / after tje ending word.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[2005] StartPosition for CommonDialogs? tim8w Windows .NET Programming 10 01-08-09 03:39 AM
search function using dot net nishudude_13 Windows .NET Programming 1 08-28-08 11:28 AM
[SOLVED] searching through a grid view painthu ASP.NET 5 05-21-08 10:11 AM
TreeView Control - Background Image? tim8w Windows .NET Programming 1 04-11-07 12:43 PM
ASP upload prob minority ASP 1 06-27-05 08:35 AM


All times are GMT -5. The time now is 08:42 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.