Matt,
this is not a direct answer to your question, more a tip on how
you design your database: You should avoid storing the same
information twice. You only risk inconsistencies. In your case
I suggest you compute the textual ID from the primary key value
using the PHP sprintf function whenever
See, Scott.. It is all about your logic.
For instance, you can create a nice multidimentional array like this:
Array(
'0'=Array(
'data'=Array( // your whole data array
data
data
Well, I don't thinik this will work. Because I will recieve an unknown
number of data. The number of PH10 I would get would be either 1 or 2 or
126, etc. There is no way to determine the number, so I already create an
counter to tell me how many of them. So, that leave me with an need to
: [PHP] Re: Any ideas on combining arrays
Well, I don't thinik this will work. Because I will recieve an
unknown
number of data. The number of PH10 I would get would be either 1 or 2
or
126, etc. There is no way to determine the number, so I already create
an
counter to tell me how many
ROTECTED]
Subject: [PHP] Re: Any ideas on combining arrays
Well, I don't thinik this will work. Because I will recieve an
unknown
number of data. The number of PH10 I would get would be either 1 or 2
or
126, etc. There is no way to determine the number, so I already create
an
counter to
'; [EMAIL PROTECTED]
Subject: RE: [PHP] Re: Any ideas on combining arrays
Use a multi-dimensional array... try this as a kind of 'proof of
concept'
?php
$array[tu4r][]=0
$array[tu4r][]=10
$array[tu4r][]=100
$array[tu4r][]=1000
$array[ph10][]=0;
$array[ph10][]=1;
$array[ph10][]=2
I'm guessing something along the lines of:
--
$string=str_replace(!,,$string);
$string=str_replace(@,,$string);
$string=str_replace(#,,$string);
$string=str_replace($,,$string);
$string=str_replace(%,,$string);
$string=str_replace(^,,$string);
--
etc.
Philip J. Newman [EMAIL PROTECTED] wrote
Or do it all in one line:
$string = ereg_replace('[!@#$%^*()_+=-';:/.,?]', '', $string);
If you want to remove non-alphanumeric characters from a string, you can do:
$string = ereg_replace('[^[:alnum:]]', '', $string);
Perl-compatible regular expressions would work as well,
]
[mailto:[EMAIL PROTECTED].
net] On Behalf Of qartis
Sent: Saturday, January 26, 2002 3:22 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Any Ideas
I'm guessing something along the lines of:
--
$string=str_replace(!,,$string);
$string=str_replace(@,,$string);
$string=str_replace(#,,$string
9 matches
Mail list logo