Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

PHP 

How do I include quotes in a variable?

Hey!

I had this thing that basically makes a new page, right. But it uses Bootstrap and quotes are NEEDED inside it. Without quotes inside the variable it all works but the layout looks really really bad.

So how do I include quotation marks in the variable like this?

http://net-paste.com/id/e679e696e.html

Having "utf-8" without the quotes works but having it with them just ruins it, ya know? 

Any help is really appreciated, as I'm still really new to PHP :)
You can either use single quotes or escape the double quotes with a single backslash before each: charset=\"utf-8\"
01000101
(Nov 18, 2017 09:21 PM)Elite Hacker 69 Wrote:  You can either use single quotes or escape the double quotes with a single backslash before each: charset=\"utf-8\"

Thanks so much bro! I'll give this a shot when I upload it tonight. Really appreciate the reply!
This is called escaping. Check out the php doc for strings http://php.net/manual/en/language.types.string.php
(Nov 18, 2017 09:31 PM)Charger Wrote:  This is called escaping. Check out the php doc for strings http://php.net/manual/en/language.types.string.php

Does rewording and linking to the manual really do anything besides boost your post count?
01000101
(Nov 19, 2017 11:08 AM)Elite Hacker 69 Wrote:  Does rewording and linking to the manual really do anything besides boost your post count?

Yes, it gives him insight on what it’s called so he can do further research.


Enjoy the -4.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[PHP] by CryptoLayerFeb 19, 2019 03:03 PM 2 192 Feb 19, 2019 03:03 PM
Last Post: newQuery
[PHP] by HoneybunMay 10, 2018 11:52 AM 5 163 May 10, 2018 11:52 AM
Last Post: Honeybun
[PHP] by Account of the GodsMar 25, 2018 03:09 PM 12 473 Mar 25, 2018 03:09 PM
Last Post: SIM-2223238