[PHP] Re: Any Ideas?

2004-03-22 Thread Geir Pedersen - Activio AS
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

RE: [PHP] Re: Any ideas on combining arrays????

2002-04-03 Thread Maxim Maletsky
: '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

Re: [PHP] Re: Any ideas on combining arrays????

2002-04-03 Thread Scott Fletcher
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

RE: [PHP] Re: Any ideas on combining arrays????

2002-04-03 Thread Demitrious S. Kelly
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

[PHP] Re: Any ideas on combining arrays????

2002-04-03 Thread Scott Fletcher
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

[PHP] Re: Any ideas on combining arrays????

2002-04-03 Thread Maxim Maletsky
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 ..

RE: [PHP] Re: Any Ideas

2002-01-26 Thread Alok K. Dhir
); > -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

[PHP] Re: Any Ideas

2002-01-26 Thread Steve Edberg
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,

[PHP] Re: Any Ideas

2002-01-26 Thread qartis
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"