Forum archives » General Discussion » What\\\'s the deal with these things? \\\\\\\\\\\\

bunnerabb
May 19, 2002 11:57 AM

Anyhoo?

Post #52683link

KajunFirefly
May 19, 2002 12:07 PM

Subject: What\\\\\\\'s the deal with these things? \\\\\\\\\\\\\\\\\\

\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//dunno\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//

Post #52684link

kramer_vs_kramer
May 19, 2002 1:14 PM

Subject: What\\\\\\\'s the deal with these things? \\\\\\\\\\\\\\\\\\

Okay, when you're putting strings into a database, you have to delimit them with either double or single quotes. So if you want to actually have a double or single quote character, you have to "escape" them with a backslash so that the database knows you want a quote character within the string, and it's not just the end of the string.

Then, when you get the string out of the database, in PHP you'd call the stripslashes function, which removes all the extra backslashes so everything looks normal. Except for some reason, it's not happening here and we're getting all the messages and comics etc with escape characters intact.

Post #52686link

andydougan
May 19, 2002 1:17 PM

Subject: What\\\\\\\'s the deal with these things? \\\\\\\\\\\\\\\\\\

I was under the impression that ' was just to delimit single characters, and " was for strings.

Post #52687link

kramer_vs_kramer
May 19, 2002 1:21 PM

Subject: What\\\\\\\'s the deal with these things? \\\\\\\\\\\\\\\\\\

I think it depends on the DB. In Mysql you can get away with using either.

Are you still doing Comp.Sci, by the way, Andy? I seem to remember you had some strips about doing Algoritmic Foundations and the like.

Post #52688link

NeoVid
May 19, 2002 1:25 PM

Subject: What\\\\\\\'s the deal with these things? \\\\\\\\\\\\\\\\\\

I have the real explanation.

68619

Post #52689link

andydougan
May 19, 2002 1:29 PM

Subject: What\\\\\\\'s the deal with these things? \\\\\\\\\\\\\\\\\\

quote:
Are you still doing Comp.Sci, by the way, Andy? I seem to remember you had some strips about doing Algoritmic Foundations and the like.

I did it last year. Two years of that hell was more than enough, though. Plus my grades were abominable.

Tell me I wasn't in your class.

Anyone want to play "Six Degrees of Kramer"?

Post #52690link

kramer_vs_kramer
May 19, 2002 1:32 PM

Subject: What\\\\\\\'s the deal with these things? \\\\\\\\\\\\\\\\\\

Did you hang around long enough for Dickman's third year pep talk?

Post #52691link

andydougan
May 19, 2002 1:35 PM

Subject: What\\\\\\\'s the deal with these things? \\\\\\\\\\\\\\\\\\

Shudder. Yes. The man who left that lecture theatre is not the same as the one who went in.

I took his advice and "fucked off and died".

Post #52692link

kramer_vs_kramer
May 19, 2002 2:04 PM

Subject: What\\\\\\\'s the deal with these things? \\\\\\\\\\\\\\\\\\

68622

Post #52693link

JrnymnNate
May 19, 2002 6:42 PM

Subject: What\\\\\\\'s the deal with these things? \\\\\\\\\\\\\\\\\\

This will make for a great joke in the days to come.

Post #52697link

JrnymnNate
May 19, 2002 9:01 PM

At times like times now, when it\\\\\\\'s "fixed".

jk

Post #52703link

Brad
May 20, 2002 12:28 AM

quote:
I was under the impression that ' was just to delimit single characters, and " was for strings.
That's in C, I believe. In PHP one of the differences between the two characters is how much parsing you want PHP to do on the string. Double quotes do more parsing for variables and such, single quotes do less. Also, a nice sloppy use is that people use double quotes when they want to print single quotes and single quotes when they want to print double. For example:

echo 'It's not going to work.'

Will not work.

echo "It's not going to work."

Will work.

echo '"It is not going to work."'

Will work.

echo '"It's not going to work."'

Won't work.

And on and on.

Post #52728link

Brad
May 20, 2002 12:28 AM

Although I forgot the semicolon on the end of all of those examples, so none of them will actually work.

Post #52729link

pita
May 20, 2002 7:35 AM

It's OK, we love you anyway

Post #52743link

Forum archives » General Discussion » What\\\'s the deal with these things? \\\\\\\\\\\\

stripcreator
Make a comic
Forums
featuring
diesel sweeties
jerkcity
exploding dog
goats
ko fight club
penny arcade
chopping block
also
Brad Sucks