ECHO $variable

ECHO $variable

am 08.10.2006 07:32:13 von Ron Piggott

--=-XTfZ3/dPON+GcuylWEM5
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

In one of my scripts I have



where

$saved_message_title is 1 Peter 5:7 "Cast all your cares on Him for He
cares about you"
--- note the "

When this is displayed on the screen it reads

1 Peter 5:7

I am assuming the " closes the value=

How may I echo this to the screen and have the full text be displayed,
not just 1 Peter 5:7 ?

Ron

--=-XTfZ3/dPON+GcuylWEM5--

Re: ECHO $variable

am 08.10.2006 07:45:45 von Niel Archer

Hi

Where's the DB question?

Niel

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: ECHO $variable

am 08.10.2006 08:29:49 von Ron Piggott

--=-96j6uA+E4QH1tLzX9Dwr
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

The database part of this is that I just retrieve $saved_message_title
from mySQL and thought it was already escaped and am not sure what went
wrong with the ECHO

On Sun, 2006-10-08 at 01:32 -0400, Ron Piggott (PHP) wrote:

> In one of my scripts I have
>
>
>
> where
>
> $saved_message_title is 1 Peter 5:7 "Cast all your cares on Him for He
> cares about you"
> --- note the "
>
> When this is displayed on the screen it reads
>
> 1 Peter 5:7
>
> I am assuming the " closes the value=
>
> How may I echo this to the screen and have the full text be displayed,
> not just 1 Peter 5:7 ?
>
> Ron

--
ron.piggott@actsministries.org
www.actsministrieschristianevangelism.org

Acts Ministries Christian Evangelism
"Where People Matter"
12 Burton Street
Belleville, Ontario, Canada K8P 1E6

In Belleville Phone: (613) 967-0032
In North America Toll Free: (866) ACTS-MIN

--=-96j6uA+E4QH1tLzX9Dwr--

Re: Re: ECHO $variable

am 08.10.2006 08:45:02 von Niel Archer

Hi

> The database part of this is that I just retrieve $saved_message_title
> from mySQL and thought it was already escaped and am not sure what went
> wrong with the ECHO

That doesn't make it a DB question. Not even close. This list is for
matters *directly* concerning DB problems.

replace:



with:



Niel

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

RE: ECHO $variable

am 08.10.2006 15:35:15 von Bastien Koert

easist way is to wrap the entire value in single quotes not double
quotes...kinda breaks the rules but it will work..the other option is to
search your value and do a replace on the double quotes

bastien


>From: "Ron Piggott (PHP)"
>Reply-To: ron.php@actsministries.org
>To: PHP DB
>Subject: [PHP-DB] ECHO $variable
>Date: Sun, 08 Oct 2006 01:32:13 -0400
>
>In one of my scripts I have
>
>
>
>where
>
>$saved_message_title is 1 Peter 5:7 "Cast all your cares on Him for He
>cares about you"
>--- note the "
>
>When this is displayed on the screen it reads
>
>1 Peter 5:7
>
>I am assuming the " closes the value=
>
>How may I echo this to the screen and have the full text be displayed,
>not just 1 Peter 5:7 ?
>
>Ron

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: ECHO $variable

am 08.10.2006 18:20:14 von Jan Bailleul

You can as well add a backslash BEFORE the "

eg. echo "text \"more text\" ";

So that will return this:
text "more text"
----- Original Message -----
From: "Bastien Koert"
To: ;
Sent: Sunday, October 08, 2006 3:35 PM
Subject: RE: [PHP-DB] ECHO $variable


> easist way is to wrap the entire value in single quotes not double
> quotes...kinda breaks the rules but it will work..the other option is to
> search your value and do a replace on the double quotes
>
> bastien
>
>
>>From: "Ron Piggott (PHP)"
>>Reply-To: ron.php@actsministries.org
>>To: PHP DB
>>Subject: [PHP-DB] ECHO $variable
>>Date: Sun, 08 Oct 2006 01:32:13 -0400
>>
>>In one of my scripts I have
>>
>>
>>
>>where
>>
>>$saved_message_title is 1 Peter 5:7 "Cast all your cares on Him for He
>>cares about you"
>>--- note the "
>>
>>When this is displayed on the screen it reads
>>
>>1 Peter 5:7
>>
>>I am assuming the " closes the value=
>>
>>How may I echo this to the screen and have the full text be displayed,
>>not just 1 Peter 5:7 ?
>>
>>Ron
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php