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:
"1.
Prologue2. First days3. Drastic
choice4. Sowarocs5.
Training6. Teneb"
How can I re
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:
"1.
Prologue2. First days3. Drastic
choice4. Sowarocs5.
Training6. Teneb"
How can I retrieve the Values and assign it to
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
Tex
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 f
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 tha
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 se
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
> 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 = sprintf
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
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:
>http://www.php.net";>the link
E, fun try this :)
http://www.php.net[/address][/link]';
$out = preg_replace(
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 = "the link"
Good Luck,
Jake Johnson
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:
http://www.php.net";>the link
Any help is appreciated
Mario
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=163&cp=1) and pull the page into a
> variable ($var). I have striped the page down to include only
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=163&cp=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 forma
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 i
]
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 unsubscr
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.<
--
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: http://www.php.net/unsub.p
going to work.
:
: Thanks!
:
: -Mensaje 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
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 you really should be doing is looking for an existing
library of code which validates email address formats agai
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:
http:/
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 unsubs
>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
>
good luck understanding. personally it is one of those things that I dust
off and pull out the help docs e
PM
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 ano
ad. Sorry if I threw you off. You can just do it like this:
$text_out = ereg_replace('(.*(\(|\[)|(\)|\]).*)', '', $text_in);
Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "Mike" <[EMAIL PROTECTED]>
To: "'Tech Support'"
M
To: Mike; PHP List
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 = "
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
(.*(\(|\[)|(\)|\]).*)', '', ${$data}); // the magic
line. feed it the string(s).
print "$i) $data";
}
###
Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -----
From: "Mike" <[EMAIL PROTECTED]>
To: "PHP List&qu
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 li
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 in
On Thursday 22 February 2001 23:42, Simon Garner wrote:
> This should do the trick (untested!):
>
> $contents = " alt=ThisOneReallyNeedsToBeAllLowercase.gif>";
>
> $contents = preg_replace("/([-_a-zA-Z0-9]+)\.gif/e",
> "strtolower('\\1') . '.gif'", $contents);
> ?>
simpler that
"/([-_a-
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=" alt=ThisOneReallyNeedsToBeAllLowercase.gif>";
>
>
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="";
$contents = EREG_REPLACE("([-_a-zA-Z0-9]+).gif",strtolower("\\0"),$contents);
Output of $conten
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="";
$contents = EREG_REPLACE("([-_a-zA-Z0-9]+).gif",strtolower("\\0"),$contents);
Output of $conten
34 matches
Mail list logo