If you read the reply I left for you there you will see I recommended you look at the link in my signature about quotes and I also explained that you should not use single quotes for the array key inside double quotes.
"Tango says double quotes with a single ( ' ) quote in the middle"
'$Name says single quotes with a double ( " ) quote in the middle'
"Tango says double quotes ( \" ) must escape a double quote"
'$Name single quotes ( \' ) must escape a single quote'
"Tango says double quotes with a single ( ' ) quote in the middle"
'$Name says single quotes with a double ( " ) quote in the middle'
"Tango says double quotes ( \" ) must escape a double quote"
'$Name single quotes ( \' ) must escape a single quote'
Hmmm it does work, and tangoforce's suggestion is what I tried myself, but it won't work in the context I need it (which you will see why). I should of used this context in my OP. Appoligies, next time..
Anyway, I then tried to use your second suggestion mlseim, but it failed:
I then tried to use the second suggestion, but it failed:
else {echo "Small - "}.$data['sizes'];
Not that you're listening to anything I say.. but here you go:
else {echo "Small - " .$data['sizes']};
Also unless you have a variable inside those double quotes swap them for single quotes.
READ THE QUOTES TOPIC IN MY SIGNATURE for the last time. You might actually learn something
"Tango says double quotes with a single ( ' ) quote in the middle"
'$Name says single quotes with a double ( " ) quote in the middle'
"Tango says double quotes ( \" ) must escape a double quote"
'$Name single quotes ( \' ) must escape a single quote'
I am new get over it, I can't remember everything in one go, and I have been listening to you. I even saved your lines from previous posts into a text file.
But why open two topics about the same issue? - I had already explained this to you in the last one.
"Tango says double quotes with a single ( ' ) quote in the middle"
'$Name says single quotes with a double ( " ) quote in the middle'
"Tango says double quotes ( \" ) must escape a double quote"
'$Name single quotes ( \' ) must escape a single quote'
Hey you know what! It is working. PHP was giving me some bizarre error about an error being on line 79, but the document only went upto line 78... so I performed undo to the last time the page was working and applied your code and it worked.
Probably missing a ; somewhere or a } in the wrong place that you hadn't noticed. Happens to all of us.
Glad its working but now its time for you to brush up on your knowledge of quote marks before you get yourself into murkier water
"Tango says double quotes with a single ( ' ) quote in the middle"
'$Name says single quotes with a double ( " ) quote in the middle'
"Tango says double quotes ( \" ) must escape a double quote"
'$Name single quotes ( \' ) must escape a single quote'
If you were to tell me I'd understand basic PHP 2 weeks ago I would of laughed.
4 weeks ago I was convinced MySQL sucked and Python and flat-files was the answer to databases. LOL
Python is however, an AWESOME language and I have high respects for it.
Flat files are cool too, but for application configuration files like in Linux.
Flat files are just wrong for a web based system IMO. Sure, it saves you having to learn to use mysql which always sounds daunting but flat files are not thread safe. That means two instances of your php script could access and read/write information to the same part of the file at the same time leading to data corruption. This is why using a thread safe database like mysql is superior to flat files.
Additionally with flat files you've got to write your own functions for finding data, updating it etc. Pain in the grass if you ask me.. I should know when I was writing apps in delphi rather than use a DB I was using ini files. 3 years later the application still isn't finished due to all of the file code needed.
"Tango says double quotes with a single ( ' ) quote in the middle"
'$Name says single quotes with a double ( " ) quote in the middle'
"Tango says double quotes ( \" ) must escape a double quote"
'$Name single quotes ( \' ) must escape a single quote'
Comment