>-Original Message-
>From: Mike Smith
>
>Is this fundamentally flawed? You mentioned "...is probably invalid in
>itself, but we'll come to that." Were you referring to the space or the
>whole pasing of array variables in an URL.
Yup, I meant the spaces, not the whole concept -- when I wrot
ht direction!
Mike Smith
-Original Message-
From: Ford, Mike [LSS] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 13, 2002 4:22 AM
To: 'Mike Smith'; PHP General
Subject: RE: [PHP] Escaping '#' Sign
> -Original Message-
> From: Mike Smith [mailto:[EMAIL P
> -Original Message-
> From: Mike Smith [mailto:[EMAIL PROTECTED]]
> Sent: 12 December 2002 14:47
>
> Rendered results of =
>
> http://company.com/custmaint.php?id=70&class=&cust=company
> T/T #29&type=OEM
>
> id is the record id
> class is Null so that's OK.
> cust=company T/T #29
> t
hard Baskett [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 11, 2002 3:57 PM
To: Mike Smith; PHP General
Subject: Re: [PHP] Escaping '#' Sign
Why don't you just try:
$cust2 = str_replace('#','#',$cust);
That should replace all instances of # with it's
Have to be a bit more specific, cause I can't reproduce your
problem... Do you have some code examples that show it clearer?
name for client is "COMPANY #1" in DB
name;
echo "This is the name: $name";
?>
Output:
This is the name: COMPANY #1
A # sign is just another character in HTML, and all
Why don't you just try:
$cust2 = str_replace('#','#',$cust);
That should replace all instances of # with it's html entity equivalent. If
that doesn¹t work then there is something else wrong with your script and
we'll need to see it all! :)
Rick
"People who drink to drown their sorrow should be
I have a string I'm returning from a database. Some entries have # signs
in the names ie (COMPANY #42, COMPANY #43...). When I display results
all I have is COMPANY. Everything after the # is dropped off. I tried:
If ($cust) {
$cust2=ereg_replace('#','no',$cust);
//tried $cust2=ereg_replace("
7 matches
Mail list logo