Solved

Variable names with hyphens?

Posted on 2006-06-20
2
499 Views
Last Modified: 2008-02-26
I have product numbers set as a primary key. I also want to use these product numbers to make a variable name. I already have a method of pulling

my product numbers appear in the following format: 1234-5678

My question is this. How can I make a variable with a hyphen in it's name? or will it always think str1234-5678 is subtract 5678 from str1234?

My goal is the following:

str1234-0001 = "Product A"
str1234-0002 = "Product B"
str1234-0003 = "Product C"
0
Comment
Question by:cipiWeb
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 16943740
you CANNOT use hyphens in variables, they would be considered as substractions.
you migth use underscore (_) instead.
0
 

Author Comment

by:cipiWeb
ID: 16944190
Thank you for your help once again.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question