OK let's say in variable $search I have the string "color" (without the
quote marks).

now I want to be able to refer to the variable $color in my code.

How in gods name do I do this.  I guess somehow I have to combine a "$" with
the contents of úsearch or something...?

- seb

-----Original Message-----
From: Jeff Oien [mailto:[EMAIL PROTECTED]]
Sent: 25 July 2001 22:05
To: PHP
Subject: RE: [PHP] Regular Expression Question


Aren't the trims just for white space?
Jeff Oien

> since you know exactly which 4 characters you want to keep you can use a
> simple string trimming routine.  I forget the name of the function in php
> but it's there and it'll be something like
>
> trimstring($string,1,5);
>
> or something like that.  No need for complicated regular expressions
either
> way.
>
> - seb
>
> -----Original Message-----
> From: Jeff Oien [mailto:[EMAIL PROTECTED]]
> Sent: 25 July 2001 21:47
> To: PHP
> Subject: [PHP] Regular Expression Question
>
>
> I want to replace a string like this 1B335-2G with this B335. So for all
the
> strings I want to remove the first character and the last three
characters.
> I'm not sure which replace function to use or how to go about it. Thanks.
> Jeff Oien
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to