Can I have spaces in VALUE

L O L. You are close!

1 Like

So when and where are spaces bad in the 21st century?

Not long ago they were considered evil, right?

I can’t believe I am asking, because I used to be one of those people.

However, formatting is also important to me when you have lists of data, and something like this is easier to read in a database table or in a form list to me, so I’d prefer keeping that style if it is okay.

I don’t know but perhaps @cpradio can help! This is no longer an HTML/CSS question.

Or maybe move this to the PHP section? Db? Content?

Now I see what you had “pre-made” :wink:

Spaces bad? Sure there are a few, column names in a table/database, within variable names, within class names, within anything remotely related to programming. Spaces in URLs is technically acceptable but many try to avoid it as it adds a level of complexity that just isn’t worth it trying to support it (encoding the URLs on output so it puts %20, decoding it when necessary, etc).

So from a programming stance, don’t put them in the technical components themselves, so not in variable names, not in column names, not in the URL. You can definitely use them in data stored, data displayed, and data collected.

3 Likes

When you say “not in variables”, do you mean “not in variable names”?

Because I do have a PHP variable called $occupation which will be getting values like “Worker - Blue-Collar” from the Radio Buttons we just talked about.

Yes, I’ve updated my post to reflect that. Good catch.

Thanks for the help!

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.