[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

[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

[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

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

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

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

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

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

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

[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 [EMAIL PROTECTED] wrote

[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,

RE: [PHP] Re: Any Ideas

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