Guest Posted March 27, 2008 Posted March 27, 2008 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?
germ Posted March 27, 2008 Posted March 27, 2008 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 >
♥FWR Media Posted March 27, 2008 Posted March 27, 2008 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 \' Ultimate SEO Urls 5 PRO - Multi Language Modern, Powerful SEO Urls KissMT Dynamic SEO Meta & Canonical Header Tags KissER Error Handling and Debugging KissIT Image Thumbnailer Security Pro - Querystring protection against hackers ( a KISS contribution ) If you found my post useful please click the "Like This" button to the right. Please only PM me for paid work.
germ Posted March 27, 2008 Posted March 27, 2008 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 >
Guest Posted March 27, 2008 Posted March 27, 2008 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.
Guest Posted March 27, 2008 Posted March 27, 2008 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
burt Posted March 27, 2008 Posted March 27, 2008 This: / Is not: \ Look again at the examples given, and then your example.
Guest Posted March 28, 2008 Posted March 28, 2008 :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.
germ Posted March 28, 2008 Posted March 28, 2008 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 >
Guest Posted March 28, 2008 Posted March 28, 2008 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
germ Posted March 28, 2008 Posted March 28, 2008 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 >
jonquil Posted March 28, 2008 Posted March 28, 2008 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....
Guest Posted March 28, 2008 Posted March 28, 2008 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.
jonquil Posted March 28, 2008 Posted March 28, 2008 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....
Guest Posted March 28, 2008 Posted March 28, 2008 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:
jonquil Posted March 28, 2008 Posted March 28, 2008 Use a text editor like TextPad (.com) :) It's all just ones and zeros....
RC Heli Pilot Posted March 28, 2008 Posted March 28, 2008 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
jonquil Posted March 28, 2008 Posted March 28, 2008 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....
Guest Posted March 28, 2008 Posted March 28, 2008 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.