ID:172030
 
While working on a DM-CGI project, I needed to different items in an list. So I gave them the variable, "ID". ID is chosen by a random number at New(), but there's a problem. When Topic() parses the item's ID, it leaves out the "+" in the scientific notation number. That generates problems, because num2text() didn't parse it. Which means we have two numbers:
ID=81273892blahblah +23
Parsed=81273892blahblah 23

So, I was wondering if there was a way to get around scientific notation, or at least remove the + in the ID.
JohnReaper wrote:
While working on a DM-CGI project, I needed to different items in an list. So I gave them the variable, "ID". ID is chosen by a random number at New(), but there's a problem. When Topic() parses the item's ID, it leaves out the "+" in the scientific notation number. That generates problems, because num2text() didn't parse it. Which means we have two numbers:
ID=81273892blahblah +23
Parsed=81273892blahblah 23

So, I was wondering if there was a way to get around scientific notation, or at least remove the + in the ID.

The correct way to do this is to encode the ID so that it will be parsed properly by Topic(). Of course, the feature you need for that is url_encode(), which won't be ready until version 340.

Lummox JR