Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Comma in text


Guest

Recommended Posts

I am having trouble with adding commas or what ever in text on pages in php. Is there a page explaining this?

 

I want to be able to add these. I saw a / replacing a ' so what's the deal?

Link to comment
Share on other sites

There is no page that can explain this in ultimate detail.

 

If you could post some sort of example of what you're attempting to do, maybe I could help and explain at the same time.

:blush:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

I am having trouble with adding commas or what ever in text on pages in php. Is there a page explaining this?

 

I want to be able to add these. I saw a / replacing a ' so what's the deal?

 

 

You have to escape them as follows: -

 

There's must be There\'s

 

It's must be It\'s

 

Basically if you are parsing text via PHP you have to escape single quotes \'

Link to comment
Share on other sites

That's it in a nutshell.

 

I've not heard of anyone having problems with comma's.

 

That's why I requested an example.

:)

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

If there is one thing that we try to live by every day <b>"If you can't have fun doing it, it’s not worth doing!"</b> This is not to say that that there is no use for work, but you have to enjoy what you’re doing to be able to do it well! If we can have fun at what we are doing and make you happy too, well then we all win.

 

 

So do i just fix it/'s? I try it.

Link to comment
Share on other sites

I tried this:

 

If there is one thing that we try to live by every day <b>"If you can't have fun doing it, it/’s not worth doing!"</b> This is not to say that that there is no use for work, but you have to enjoy what you/’re doing to be able to do it well! If we can have fun at what we are doing and make you happy too, well then we all win.

 

and the page fails

Link to comment
Share on other sites

:blush: stupid me

 

What about the " quote marks? It still does not load.

 

 

By using this website and shopping here you are agreeing to the following: </B></span><br><br>
That you plan on having fun with the gear you purchase from us. <br><br>
That you want to buy some of the lowest priced products to be found anywhere. <br><br>
That you will enjoy your sporting experience to the fullest.<br><br>
That is you are going hunting or fishing, you will make every effort to take a kid with you. <br><br>
That you will always give back twice that you receive.<br><br>
That you will always be an inspiration to those around you.<br><br>If there is one thing that we try to live by every day <b>"If you can't have fun doing it, it\’s not worth doing!"</b> This is not to say that that there is no use for work, but you have to enjoy what you\’re doing to be able to do it well! If we can have fun at what we are doing and make you happy too, well then we all win.

Link to comment
Share on other sites

you can't have fun doing it

 

you can\'t have fun doing it

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Thanks, stupid me, again.

 

Now this below is what worked, but it does not make sense to me. Why?

 

define('TEXT_INFORMATION', '<span style="font-size: 12pt"><B>By using this website and shopping here you are agreeing to the following: </B></span><br><br>
That you plan on having fun with the gear you purchase from us. <br><br>
That you want to buy some of the lowest priced products to be found anywhere. <br><br>
That you will enjoy your sporting experience to the fullest.<br><br>
That if you are going hunting or fishing, you will make every effort to take a kid with you. <br><br>
That you will always give back twice that you receive.<br><br>
That you will always be an inspiration to those around you.<br><br>If there is one thing that we try to live by every day <b>"If you can\'t have fun doing it, it’s not worth doing!"</b> This is not to say that that there is no use for work, but you have to enjoy what you’re doing to be able to do it well! If we can have fun at what we are doing and make you happy too, well then we all win.');
?>

 

Can't needed the /

The it's in the bold did not!

The you're did not need the / either

 

So it is only it was only can't

Link to comment
Share on other sites

It's because you've used different characters that look similar.

 

PHP uses the (what I call) single tick mark ('), next to the <enter> key on my keyboard.

 

The words in your text that didn't need the backslash (\) are using the other tick mark (`) next to the number 1 key on my keyboard.

 

If I were you, I'd forget about the tick mark near the number 1 key. If you tried to used that in PHP it would probably cause and error, and take you forever to find it!

:lol:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Give this a shot.

 

define('TEXT_INFORMATION', '<B>By using this website and shopping here, you are agreeing to the following: </B><br><br>
That you plan on having fun with the gear you purchase from us. <br><br>
That you want to buy some of the lowest priced products to be found anywhere. <br><br>
That you will enjoy your sporting experience to the fullest.<br><br>
That if you are going hunting or fishing, you will make every effort to take a goat with you. <br><br>
That you will always give back twice what you receive.<br><br>
That you will always be an inspiration to those around you.<br><br>
If there is one thing we try to live by every day, it\'s this: <b>"If you can\'t have fun doing it, it\'s not worth doing!"</b> This is not to say that there is no use for work, but you have to enjoy what you\'re doing to be able to do it well! If we can have fun at what we are doing and make you happy, too, well then, we all win.');
?>

 

Germ is right. There are slight differences in the marks that cause big headaches.

 

acute accent ( ´ )

reverse accent mark ( ` )

apostrophe ( ' ) Always use this one to be cross-browser compatible and in language file "defines," use \' :)

 

And if you use a "curly quote," some browsers will not render it as the apostrophe you intend, but it will come across a symbol instead.

 

jon

It's all just ones and zeros....

Link to comment
Share on other sites

The only difference I can see is the ' had a t behind it making it display straight up and not angling off at 45 degrees. so it need a \ and the other did not, even though they are the same character from my keyboard. They just display different some how.

Link to comment
Share on other sites

The only difference I can see is the ' had a t behind it making it display straight up and not angling off at 45 degrees. so it need a \ and the other did not, even though they are the same character from my keyboard. They just display different some how.

 

Ah, what program are you using to edit the php files?

It's all just ones and zeros....

Link to comment
Share on other sites

Ah, what program are you using to edit the php files?

 

I don't have one. I am using admin - file manager to edit the php files right now. I want to be able to do it off as I can edit them with my html editor, but I need to get xamp or wamp to view them. I have done html for a while, but php is all new, in case you can't tell. :lol:

Link to comment
Share on other sites

I don't know if this will help you or not but,..

 

I use a web editor such as MS Web Expressions when i start a new page i check the code out and delete everything there already and then i go back and design my page the way i want it and then i just copy the whole code in to the description box in OSC and bing, bang, boom,... Works Everytime!

 

Then i just save the web page with the product name incase i want to edit it later.

 

Maybe this will help ya.

 

RCHP

Link to comment
Share on other sites

Do not use file manager to edit your files. If someone gets into your Admin, you are screwed (hello? Access to your configure files?). Delete (catalog)/admin/file_manager.php. Use a text editor to edit your files locally, then FTP the file up to the server.

 

jon

It's all just ones and zeros....

Link to comment
Share on other sites

Do not use file manager to edit your files. If someone gets into your Admin, you are screwed (hello? Access to your configure files?). Delete (catalog)/admin/file_manager.php. Use a text editor to edit your files locally, then FTP the file up to the server.

 

jon

 

I have not learned how to edit the catalog with out being in it yet. Or where the database is and how to edit it, or if they are the same.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...