[PHP] String Manipulation

2006-06-05 Thread Rodrigo de Oliveira Costa
Hi guys I have the following intention and would really like to know if tis possible and if its possible how should it be done. I have a string that is something like this: INPUT TYPE=BUTTON Value='nbsp;nbsp;#171;nbsp;nbsp;' onClick=self.location='/s/979216/22/'SELECT title='chapter

Re: [PHP] String Manipulation

2006-06-05 Thread Chris
Rodrigo de Oliveira Costa wrote: Hi guys I have the following intention and would really like to know if tis possible and if its possible how should it be done. I have a string that is something like this: INPUT TYPE=BUTTON Value='nbsp;nbsp;#171;nbsp;nbsp;'

Re: [PHP] String manipulation out of the box solution?

2005-05-11 Thread Merlin
Richard Lynch wrote: On Tue, May 10, 2005 5:58 am, Merlin said: I am writing an internal full text search engine and do have trouble in outputting the text in an apropriate way. Problem is that if there is more than one word I cant handle the text cropping. For example: Search term: php germany

[PHP] String manipulation out of the box solution?

2005-05-10 Thread Merlin
Hi there, I am writing an internal full text search engine and do have trouble in outputting the text in an apropriate way. Problem is that if there is more than one word I cant handle the text cropping. For example: Search term: php germany Text from database: There is no such great language

Re: [PHP] String manipulation out of the box solution?

2005-05-10 Thread Richard Lynch
On Tue, May 10, 2005 5:58 am, Merlin said: I am writing an internal full text search engine and do have trouble in outputting the text in an apropriate way. Problem is that if there is more than one word I cant handle the text cropping. For example: Search term: php germany Text from

[PHP] string manipulation

2004-08-12 Thread Matthew Oatham
Hi I am trying to track down a method for transferring a database id such as 5 into a nice formatted order id such as ORD0005 - where the format for the order id is ORD + 5 digits made up of the database id Thanks Matt

Re: [PHP] string manipulation

2004-08-12 Thread Michal Migurski
Hi I am trying to track down a method for transferring a database id such as 5 into a nice formatted order id such as ORD0005 - where the format for the order id is ORD + 5 digits made up of the database id See documentation for sprintf(). Try something like: $formatted =

Re: [PHP] string manipulation

2004-08-12 Thread Jason Wong
On Friday 13 August 2004 01:00, Matthew Oatham wrote: Hi I am trying to track down a method for transferring a database id such as 5 into a nice formatted order id such as ORD0005 - where the format for the order id is ORD + 5 digits made up of the database id str_pad(), please RTFM before you

Re: [PHP] string manipulation

2004-08-12 Thread John Nichel
Jason Wong wrote: str_pad(), please RTFM before you ask such questions. It's obvious from your subject that you know it's something to do with strings, so where better than to look at the chapter on String Functions? Browse through them, checkout the examples, it's a good way to learn. But I

[PHP] String manipulation

2003-06-11 Thread Marios Adamantopoulos
Hi all I wonder if anyone can help with this. I have a piece of copy that includes this: [link][title]the link[/title][address]http://www.php.net[/address][/link] And I need to change it to this: a href=http://www.php.net;the link/a Any help is appreciated Mario

Re: [PHP] String manipulation

2003-06-11 Thread Jake Johnson
Use the substr function to get the part you want. Then prefix/suffix the parts you want. //you may want to derive the positions as vars $rest = substr(abcdef, 1, 3); // returns bcd //you may want to put the link name into a var as well for below $rest = a href=\ . $rest . the link/a Good

Re: [PHP] String manipulation

2003-06-11 Thread Wendell Brown
On Wed, 11 Jun 2003 14:53:13 +0100, Marios Adamantopoulos wrote: [link][title]the link[/title][address]http://www.php.net[/address][/link] And I need to change it to this: a href=http://www.php.net;the link/a E, fun try this :) ?PHP $in = '[link][title]the

RE: [PHP] String Manipulation

2003-06-02 Thread Don Read
On 31-May-2003 S. Cole wrote: Hello all, I'm currently working on a site for my brother-in-law. I have written a script that will access a website (http://www.remax.nf.ca/listings.asp?a=163cp=1) and pull the page into a variable ($var). I have striped the page down to include only the

[PHP] String Manipulation

2003-06-01 Thread S. Cole
Hello all, I'm currently working on a site for my brother-in-law. I have written a script that will access a website (http://www.remax.nf.ca/listings.asp?a=163cp=1) and pull the page into a variable ($var). I have striped the page down to include only the listings (still in HTML and table

[PHP] string manipulation

2003-02-20 Thread Gregory Heinrichs
little help please, looking for correct functions to use to search for the last occurrence of a character in a string and truncate everything in front of it including the searched for character. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] string manipulation

2003-02-20 Thread Leif K-Brooks
Try this (untested): print preg_replace('|[^]*$|','$1',$text); Gregory Heinrichs wrote: little help please, looking for correct functions to use to search for the last occurrence of a character in a string and truncate everything in front of it including the searched for character. --

RE: [PHP] string manipulation

2003-02-20 Thread Kelly Protsko
] Subject: [PHP] string manipulation little help please, looking for correct functions to use to search for the last occurrence of a character in a string and truncate everything in front of it including the searched for character. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

Re: [PHP] string manipulation

2003-02-20 Thread Joachim Krebs
This is the best method echo substr(strrchr($string, $char), 1); On 21 February 2003 at 00:13:02, Gregory Heinrichs wrote: little help please, looking for correct functions to use to search for the last occurrence of a character in a string and truncate everything in front of it

[PHP] String manipulation

2002-10-24 Thread Francisco Vaucher
Hi to all (again ;-) I need one or more PHP functions to handle a form input. i.e. you write: [EMAIL PROTECTED] I have to check that after the '@' comes 'test.com'. I think this is easy, Any help on this ? regards in advance... f. -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] String manipulation

2002-10-24 Thread Justin French
Well, what you really trying to do? Validate the format of an email address? If so, what you really should be doing is looking for an existing library of code which validates email address formats against the RFC standard. phpclasses.org is bound to have some, but I really like this one:

RE: [PHP] String manipulation

2002-10-24 Thread Francisco Vaucher
: Francisco Vaucher; '[EMAIL PROTECTED]' Asunto: Re: [PHP] String manipulation Well, what you really trying to do? Validate the format of an email address? If so, what you really should be doing is looking for an existing library of code which validates email address formats against the RFC standard

Re: [PHP] String manipulation

2002-10-24 Thread Joshua E Minnie
original- : De: Justin French [mailto:justin;indent.com.au] : Enviado el: jueves, 24 de octubre de 2002 11:29 : Para: Francisco Vaucher; '[EMAIL PROTECTED]' : Asunto: Re: [PHP] String manipulation : : : Well, what you really trying to do? Validate the format of an email : address? If so, what

[PHP] String Manipulation

2002-07-25 Thread Mike
Hello all, I know that this has probably been discussed before and that you will tell me to go through all the back messages on the list but I really don't have time to do that because I am on a really tight schedule, but I was wondering if anyone could give me some pointers on how to pull some

Re: [PHP] String Manipulation

2002-07-25 Thread Bas Jobsen
Maybe something like: eregi('([a-z]*)( *)(\(*)([a-z]+)( *)(\)*)([a-z]*)',$string,$matches); echo $matches[4]; Op donderdag 25 juli 2002 17:13, schreef Mike: Hello all, I know that this has probably been discussed before and that you will tell me to go through all the back messages on the list

Re: [PHP] String Manipulation

2002-07-25 Thread Tech Support
; } ### Jim Grill Support Web-1 Hosting http://www.web-1hosting.net - Original Message - From: Mike [EMAIL PROTECTED] To: PHP List [EMAIL PROTECTED] Sent: Thursday, July 25, 2002 10:13 AM Subject: [PHP] String Manipulation Hello all, I know that this has probably been discussed before

RE: [PHP] String Manipulation

2002-07-25 Thread Mike
Thanks, it worked like a charm ;) Mike -Original Message- From: Tech Support [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 25, 2002 11:39 AM To: Mike; PHP List Subject: Re: [PHP] String Manipulation I tested this out with success. $string = ereg_replace

RE: [PHP] String Manipulation

2002-07-25 Thread Mike
Subject: Re: [PHP] String Manipulation I tested this out with success. $string = ereg_replace('(.*(\(|\[)|(\)|\]).*)', '', $string); ### // Here is actual working code $string1 = (Something) - is wrong with me; $string2 = something - (is wrong with me); $string3 = something

Re: [PHP] String Manipulation

2002-07-25 Thread Tech Support
); Jim Grill Support Web-1 Hosting http://www.web-1hosting.net - Original Message - From: Mike [EMAIL PROTECTED] To: 'Tech Support' [EMAIL PROTECTED]; PHP List [EMAIL PROTECTED] Sent: Thursday, July 25, 2002 10:48 AM Subject: RE: [PHP] String Manipulation Ok, It works and everything, but I

RE: [PHP] String Manipulation

2002-07-25 Thread Mike
To: Mike; PHP List Subject: Re: [PHP] String Manipulation okay... the break down the regexp: '(.*(\(|\[)|(\)|\]).*)' .* = any character from zero to infinite number of times (\(|\[) = either ( or [ (they are escaped with a \ bcz they have other meaning then I have another pipe | meaning

RE: [PHP] String Manipulation

2002-07-25 Thread Dave [Hawk-Systems]
Wow, Thank you for the explanation, it helped out a lot ;) I don't know regex very well, but I hope that this will give me a better understanding of it. Thank you Yet again, Mike clipped regex explanation good luck understanding. personally it is one of those things that I dust off and pull

Re: [PHP] String manipulation with ereg_replace

2001-02-22 Thread Simon Garner
From: "Ian LeBlanc" [EMAIL PROTECTED] I am working on a site that has over 1000 pages and all the images need to be made lower case in the HTML. Here is what I have so far. Please someone tell me what I am doing wrong. $contents="img src=ThisOneReallyNeedsToBeAllLowercase.gif

Re: [PHP] String manipulation with ereg_replace

2001-02-22 Thread Christian Reiniger
On Thursday 22 February 2001 23:42, Simon Garner wrote: This should do the trick (untested!): ? $contents = "img src=ThisOneReallyNeedsToBeAllLowercase.gif alt=ThisOneReallyNeedsToBeAllLowercase.gif"; $contents = preg_replace("/([-_a-zA-Z0-9]+)\.gif/e", "strtolower('\\1') .