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
: 'Scott Fletcher'; [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'
>
>
> $array["tu4r"][]=0
> $array["tu4r"][]=10
> $ar
gt; $array["tu4r"][]=10
> $array["tu4r"][]=100
> $array["tu4r"][]=1000
> $array["ph10"][]=0;
> $array["ph10"][]=1;
> $array["ph10"][]=2;
> $array["ph10"][]=126;
>
> echo '';
> foreach ( $array
o ' TU4R: '.$value.chr(10);
}
echo '';
?>
cheers
-Original Message-
From: Scott Fletcher [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 03, 2002 10:15 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Any ideas on combining arrays
Well, I don't thinik this
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
c
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
..
);
> -Original Message-
> From:
> [EMAIL PROTECTED]
> [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 th
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,
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"
9 matches
Mail list logo