Re: [PHP] string to array

2002-11-08 Thread Timothy Hitchens (HiTCHO)
That won't work.. empty delimiter errors always.. you will have to use my preg one from earlier... Timothy Hitchens (HiTCHO) [EMAIL PROTECTED] If you need PHP hosting with an experienced support team 24/7 then email me today. On Fri, 8 Nov 2002, Erwin wrote: Tom Rogers wrote: Hi,

Re: [PHP] string to array

2002-11-08 Thread Maxim Maletsky
String IS an array. Basically, you could do this: $str = 'The Dummy String'; for($i=0; $istrlen($str); $i++) { echo $str[$i] . ':'; } and you sould get the output: T:h:e: :D:u:m:m:y: :S:t:r:i:n:g: As of actually converting it you could do that very loop and have an: $atr_arr[] =

Re: [PHP] string to array

2002-11-08 Thread Maxim Maletsky
Erwin [EMAIL PROTECTED] wrote... : A string is already an array of chars $string = 'string'; echo $string[0]; // will echo 's' True, but that's different than the array type. Sometimes you'll just need an array instead of a string. Try using $string = explode( '', 'string' );

Re: [PHP] string to array

2002-11-08 Thread @ Edwin
Hello, Maxim Maletsky [EMAIL PROTECTED] wrote: [snip] As of actually converting it you could do that very loop and have an: $atr_arr[] = $str[$i] in it, or, even more elegantly by using split() function or ...chunk.. something function(), don't remember right now. [/snip] Perhaps, this

Re: [PHP] string to array

2002-11-08 Thread Erwin
$string = explode( '', 'string' ); Timothy Hitchens wrote: That won't work.. empty delimiter errors always.. Your right, I didn't know. you will have to use my preg one from earlier... But your preg thingy will only split at spaces, so that'll have to change to ? $string = 'test';

Re: [PHP] string to array

2002-11-08 Thread Marek Kilimajer
This is working great, thank you. Timothy's expression output one empty element at the start and the end, but otherwise worked ( and I don't know why :-( Erwin wrote: $string = explode( '', 'string' ); Timothy Hitchens wrote: That won't work.. empty delimiter errors always..

Re: [PHP] string to array

2002-11-08 Thread Maxim Maletsky
Guys, not to confuse you, but I think there is a more elegant way doing it that. I had the same issue once long ago (2-3 years ago?) and had put it up on the mailing lists too. Gotta remember what it was and for what project then find the code in my libraries. I really think i accomplished it

Re: [PHP] String Expression for aplpahnumeric password

2002-11-01 Thread @ Edwin
Hello, (B (B"Adam" [EMAIL PROTECTED] wrote in message (B[EMAIL PROTECTED]">news:[EMAIL PROTECTED]... (B I need a string expression to verify an alpha numeric password. This is (Bwhat (B i've come up with , however it does not work: (B (B elseif ( (!ereg ("^[a-zA-Z]+$", $password)) ||

Re: [PHP] String to Ascii

2002-10-31 Thread Evan Nemerson
ebcdic2ascii() is an Apache-specific function which is available only on EBCDIC based operating systems (OS/390, BS2000). -php.net/ebcdic What kind of text??? Usually, the text is in ASCII? Do you want to convert to the actual numerical representation (ie A == 0x41)? If so, you can try

Re: [PHP] String manipulation

2002-10-24 Thread Justin French
Well, what you really trying to do? Validate the format of an email address? If so, what you really should be doing is looking for an existing library of code which validates email address formats against the RFC standard. phpclasses.org is bound to have some, but I really like this one:

RE: [PHP] String manipulation

2002-10-24 Thread Francisco Vaucher
: Francisco Vaucher; '[EMAIL PROTECTED]' Asunto: Re: [PHP] String manipulation Well, what you really trying to do? Validate the format of an email address? If so, what you really should be doing is looking for an existing library of code which validates email address formats against the RFC standard

Re: [PHP] String manipulation

2002-10-24 Thread Joshua E Minnie
original- : De: Justin French [mailto:justin;indent.com.au] : Enviado el: jueves, 24 de octubre de 2002 11:29 : Para: Francisco Vaucher; '[EMAIL PROTECTED]' : Asunto: Re: [PHP] String manipulation : : : Well, what you really trying to do? Validate the format of an email : address? If so, what

Re: [PHP] String Help PLEASE!

2002-10-08 Thread Robert Cummings
Shane wrote: Greetings gang, this should be an easy one but it's kicking my butt today. I need to build a member number in the format of -00- from an auto increment ID field from my DB. I can get the last ID value easy enough, but how the heck can I tag the new ID on to the end

RE: [PHP] string division

2002-09-19 Thread Jay Blanchard
[snip] which function divides astring to the pieces accorrding to another string. for example according to a comma .. [/snip] explode() http://www.php.net/manual/en/function.explode.php HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] string division

2002-09-19 Thread Chris Boget
which function divides astring to the pieces accorrding to another string. for example according to a comma .. explode(); Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] string division

2002-09-19 Thread WEB MASTER
||string *strtok*| (string arg1, string arg2); | Meltem Demirkus wrote: which function divides astring to the pieces accorrding to another string. for example according to a comma .. thanks... meltem -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] String operation

2002-09-04 Thread Bas Jobsen
$string3 = str_replace($string1,'',$string2); ??? Op woensdag 04 september 2002 17:04, schreef Richard Fox: Hi Given string1 = /home/web/ string2 = /home/web/www/index.php How can I elegantly do an exclusive or of string1 with string2, that is, I want to end up with string3 =

Re: [PHP] string questions

2002-08-03 Thread Danny Shepherd
Try, list($test)=explode(' ',$address); HTH Danny - Original Message - From: webmaster [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, August 02, 2002 5:35 PM Subject: [PHP] string questions I know there has to be an easy way to do this, but I just can't find the answer.

Re: [PHP] string questions

2002-08-02 Thread Jason Wong
On Saturday 03 August 2002 00:35, webmaster wrote: I know there has to be an easy way to do this, but I just can't find the answer. I need to strip out the first part of a text string. I've figured out out to strip out the last part of a string using the following: $address = (4455 N.

Re: [PHP] string questions

2002-08-02 Thread Musone Verdana
Use function explode, preg_split, split to split the text string. $pieces = explode( , $address); echo $pieces[0]; // will output 4455 - Original Message - From: Jason Wong Sent: Saturday, August 03, 2002 1:12 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] string questions On Saturday 03

RE: [PHP] String Question

2002-08-01 Thread Tim Ward
or ... while($new = substr($old, $i++ * $strlen, $strlen)) $array[] = $new; Tim Ward www.chessish.com -Original Message- From: Richard Baskett [mailto:[EMAIL PROTECTED]] Sent: 31 July 2002 20:47 To: Randy Johnson; PHP General Subject: Re: [PHP] String Question

Re: [PHP] String Question

2002-07-31 Thread Martin Clifford
Give this a whirl: ?php $string = abcdefghijklmnopqrstuvwxyz; $len = strlen($string) // in this case, 26 for($i=0; $i $len; $i+8) { $str_array[] = substr($string, $i, 8); } for($i=0; $i count($str_array); $i++) { echo $str_array[$i] . br\n; } ? I haven't tested it, but in theory it

Re: [PHP] String Question

2002-07-31 Thread Richard Baskett
? $string = 'abcdefghijklmnopqrstuvwxyz'; $strNum = ceil(strlen($string)/8); for ($i=0; $i$strNum; $i++) $newString[] = substr($string, ($i*8), 8); for ($j=0; $jcount($newString); $j++) echo string$j = $newString[$j]br /; ? Rick A sense of humor can help you over look the unattractive,

Re: [PHP] String Question

2002-07-31 Thread J.F.Kishor
Hi Randy, Just copy the following code and execute it, it works as you require, tested works fine. ? $string=abcdefghijklmnopqrstuvwxyz; $length = strlen($string); // Finds the length of the string $octFull = round($length/8);// splits the length and finds how many

RE: [PHP] string comparison

2002-07-27 Thread John Holmes
Strcmp() is case sensitive. So use it when you need a case sensitive comparison. ---John Holmes... -Original Message- From: Bas Jobsen [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 27, 2002 12:35 PM To: PHP General Subject: [PHP] string comparison Hello, When should i

Re: [PHP] String Manipulation

2002-07-25 Thread Bas Jobsen
Maybe something like: eregi('([a-z]*)( *)(\(*)([a-z]+)( *)(\)*)([a-z]*)',$string,$matches); echo $matches[4]; Op donderdag 25 juli 2002 17:13, schreef Mike: Hello all, I know that this has probably been discussed before and that you will tell me to go through all the back messages on the list

Re: [PHP] String Manipulation

2002-07-25 Thread Tech Support
I tested this out with success. $string = ereg_replace('(.*(\(|\[)|(\)|\]).*)', '', $string); ### // Here is actual working code $string1 = (Something) - is wrong with me; $string2 = something - (is wrong with me); $string3 = something - (is wrong with me; $string4 = [something]

RE: [PHP] String Manipulation

2002-07-25 Thread Mike
Thanks, it worked like a charm ;) Mike -Original Message- From: Tech Support [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 25, 2002 11:39 AM To: Mike; PHP List Subject: Re: [PHP] String Manipulation I tested this out with success. $string = ereg_replace

RE: [PHP] String Manipulation

2002-07-25 Thread Mike
Subject: Re: [PHP] String Manipulation I tested this out with success. $string = ereg_replace('(.*(\(|\[)|(\)|\]).*)', '', $string); ### // Here is actual working code $string1 = (Something) - is wrong with me; $string2 = something - (is wrong with me); $string3 = something

Re: [PHP] String Manipulation

2002-07-25 Thread Tech Support
); Jim Grill Support Web-1 Hosting http://www.web-1hosting.net - Original Message - From: Mike [EMAIL PROTECTED] To: 'Tech Support' [EMAIL PROTECTED]; PHP List [EMAIL PROTECTED] Sent: Thursday, July 25, 2002 10:48 AM Subject: RE: [PHP] String Manipulation Ok, It works and everything, but I

RE: [PHP] String Manipulation

2002-07-25 Thread Mike
To: Mike; PHP List Subject: Re: [PHP] String Manipulation okay... the break down the regexp: '(.*(\(|\[)|(\)|\]).*)' .* = any character from zero to infinite number of times (\(|\[) = either ( or [ (they are escaped with a \ bcz they have other meaning then I have another pipe | meaning

RE: [PHP] String Manipulation

2002-07-25 Thread Dave [Hawk-Systems]
Wow, Thank you for the explanation, it helped out a lot ;) I don't know regex very well, but I hope that this will give me a better understanding of it. Thank you Yet again, Mike clipped regex explanation good luck understanding. personally it is one of those things that I dust off and pull

Re: [PHP] String within a string

2002-06-16 Thread Chris Shiflett
Each item within double quotes is a literal string. The example you inquire about dynamically builds an SQL statement. For example, if $searchtype is author_name and $searchterm is Rasmus, then you would build a statement like: select * from books where author_name like '%Rasmus%'; The SQL

Re: [PHP] String within a string

2002-06-16 Thread Anthony Ritter
Chris, Maybe I didn't make myself clear... LIKE '%// Beginning of double quote and then beginning single quote beacuse it is the beginning of a string which then ends before the variable $searchterm. .. Is the reason that the is a

Re: [PHP] String within a string

2002-06-16 Thread Chris Shiflett
I might be misinterpreting the question, because it sounds like the same question as before. Let me try to be more thorough. SQL statements traditionally use single quotes around literal values. There is no reason of escaping that makes this characteristic exist. Now, in PHP, most people

Re: [PHP] String within a string

2002-06-16 Thread Anthony Ritter
Many thanks Chris. Tony --- [This E-mail scanned for viruses by IAS, an Archiventure Company] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] string to array?

2002-06-13 Thread Analysis Solutions
On Thu, Jun 13, 2002 at 11:17:50AM -0600, Leston Drake wrote: I have a string something like 10.2.3 I want to be able to use the . as a delimiter to reference the elements (10, 2, and 3). http://www.php.net/manual/en/function.explode.php Enjoy, --Dan -- PHP classes that

RE: [PHP] string to array?

2002-06-13 Thread David Freeman
I have a string something like 10.2.3 I want to be able to use the . as a delimiter to reference the elements (10, 2, and 3). My thought was to create an array, using . as the delimiter. Is there a function that will create an array out of a string, using a delimiter you specify?

Re: [PHP] string convertion to time substracting

2002-06-07 Thread Chris Knipe
Awesome :-) Glad to have been able to help... -- me - Original Message - From: juaid [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, June 07, 2002 9:22 PM Subject: [PHP] string convertion to time substracting Well, I got all working now and calculating the duration with mysql

Re: [PHP] String check

2002-04-30 Thread 1LT John W. Holmes
if(substr($string,0,3) == 123) { //do some stuff } ---John Holmes... - Original Message - From: David Orn Johannsson [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, April 30, 2002 8:03 AM Subject: [PHP] String check Is ther any function that I could use to check if a string

Re: [PHP] String check

2002-04-30 Thread Justin French
eregi() is the go... whilst the documentation is pretty thin on the actual expressions, '^' checks for the pattern at the begining of a string. ? if(eregi('^324', $string)) { // // it did begin with 324 // } else { // // it didn't // } ? Justin French

Re: [PHP] String check

2002-04-30 Thread 1LT John W. Holmes
Message - From: Justin French [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, April 30, 2002 8:15 AM Subject: Re: [PHP] String check eregi() is the go... whilst the documentation is pretty thin on the actual expressions, '^' checks for the pattern at the begining

RE: [PHP] String termination

2002-04-12 Thread Martin Towell
I think that all chars (\0 to \255) are valid chars in php, from the looks of it, php maintains the strings length, or something, so that you can have \0 in the string Martin -Original Message- From: Marco Laponder [mailto:[EMAIL PROTECTED]] Sent: Friday, April 12, 2002 4:50 PM To:

Re: [PHP] String termination

2002-04-12 Thread Andrey Hristov
the zval struct in PHP is multifunctional and its string branch has length member. Much of the operations on string are with *_STRINGL() L comes from length. It is preferable php function to use the length instead of *_STRING macros which looks throug the string to find its end. Andrey -

Re: [PHP] String?

2002-04-11 Thread Michael Virnstein
see what's wrong here: ereg('(^[0-1231]$).jpg$',$file_name) [] meens a group of characters, so in your case 0,1,2 and 3 are valid characters. you haven't defined any modifer like ?,*,+ or{}, so one of this characters has to be found exactly one time. you're using ^ outside the [] so it meens the

Re: [PHP] String?

2002-04-11 Thread Michael Virnstein
and i'd suggest using eregi instead, because then also .Jpg or .JPG will be found. Michael Virnstein [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... see what's wrong here: ereg('(^[0-1231]$).jpg$',$file_name) [] meens a group of characters, so in your

Re: [PHP] string reverse ??

2002-04-09 Thread ayukawa
Hello, try this; ? function revstr($str){ for($i=strlen($str)-1;$i-1;$i--){ $ans.=$str[$i]; } return $ans; } $a=Good morning!; print revstr($a); ? Regards, Hiroshi Ayukawa http://hoover.ktplan.ne.jp/kaihatsu/php_en/index.php -- PHP General

Re: [PHP] string reverse ??

2002-04-09 Thread Jason Wong
On Tuesday 09 April 2002 23:33, Miguel Cruz wrote: On Tue, 9 Apr 2002, Scott Fletcher wrote: Is there a PHP code or function that would reverse the data in the string? Oh come on. Is it really THAT hard to look at the manual? There was a guy on this list a while back, when asked this

Re: [PHP] string to array??

2002-01-17 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 17-01-02 at 11:46 * Sandeep Murphy said hi, can i convert a string to an array?? if so how shud the syntax read?? Thnx, sands Check out explode() www.php.net/manual/en/function.explode.php - -- Nick Wilson Tel:+45

Re: [PHP] string to array??

2002-01-17 Thread Scott Houseman
Hi There. You should use this function: split -- split string into array by regular expression array split (string pattern, string string [, int limit]) So, to split a string ( e.g. a sentence ) so that each word in the string is an element of the array do something like this ?php

Re: [PHP] string to array??

2002-01-17 Thread Steve Edberg
Actually, you can treat a string as an array without any further processing: $Globbot = 'dribcot'; echo $Globbot[0]; # echoes 'd' echo $Globbot[6]; # echoes 't' Check out 'String access by character' about halfway down the page at

Re: [PHP] string to array??

2002-01-17 Thread Nick Wilson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 17-01-02 at 12:57 * Steve Edberg said Actually, you can treat a string as an array without any further processing: $Globbot = 'dribcot'; echo $Globbot[0]; # echoes 'd' echo $Globbot[6]; # echoes 't'

Re: [PHP] string to array??

2002-01-17 Thread Neil Freeman
You just have to remember that a string is simply a character array :) Nick Wilson wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 * On 17-01-02 at 12:57 * Steve Edberg said Actually, you can treat a string as an array without any further processing: $Globbot =

Re: [PHP] string to array??

2002-01-17 Thread Erik Price
$TF_string = Starscream, Megatron, Jetfire, Optimus Prime; $TF_array = explode(, , $TF_string); print_r($TF_array); (note the space after the comma in the first argument to explode(), this necessary to avoid the space being include in each element of the array) Hope that helps, Erik On

Re: [PHP] string to array??

2002-01-17 Thread Erik Price
I didn't know that either. Does this apply only when accessing strings by character? Or are all conventional uses of brackets deprecated for the purposes of arrays? It doesn't say on that page (http://www.php.net/manual/en/language.types.string.php , a bit more than halfway down). Erik

Re: [PHP] string to array??

2002-01-17 Thread Steve Edberg
Sorry if I was less than totally clear; I was referring to this part of the page: Characters within strings may be accessed by specifying the zero-based offset of the desired character after the string in curly braces. Note: For backwards compatibility, you

Re: [PHP] string to array??

2002-01-17 Thread Erik Price
Yes thank you, I thought I would have heard about it before now if all brackets were deprecated! ;) I bit, though, when I read that page you linked to. Thanks for the clarification though. Erik On Thursday, January 17, 2002, at 03:49 PM, Steve Edberg wrote: Sorry if I was less than

Re: [PHP] String handling with special char?

2001-10-30 Thread Frewuill Rodriguez
just use url_encode() to encode your parameters and then pass them It's just like richard basket problem a few emails behind $parameters = url_encode(error=25); index.htm?$parameters Hope this helps - Original Message - From: Andrew Cowles [EMAIL PROTECTED] To: [EMAIL PROTECTED]

Re: [PHP] String handling with special char?

2001-10-30 Thread Andrew Cowles
Hi Frewuill, Thanks for the mail. The parameters are passed from an end user via HTTP GET and on receipt I use urlencode($parametername) but, the parameter only contains data up to the 1st occurance of %00 and then ends. Calling the following code with 'script.php?text=%0A%01%00%B1%B2' would

Re: [PHP] String handling with special char?

2001-10-30 Thread Frewuill Rodriguez
. I tested it and it worked. Hope this helps - Original Message - From: Andrew Cowles [EMAIL PROTECTED] To: Frewuill Rodriguez [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Tuesday, October 30, 2001 9:23 AM Subject: Re: [PHP] String handling with special char? Hi Frewuill, Thanks

Re: [PHP] String handling with special char?

2001-10-30 Thread Andrew Cowles
] Sent: Tuesday, October 30, 2001 9:23 AM Subject: Re: [PHP] String handling with special char? Hi Frewuill, Thanks for the mail. The parameters are passed from an end user via HTTP GET and on receipt I use urlencode($parametername) but, the parameter only contains data up to the 1st

Re: [PHP] String breaking up

2001-10-26 Thread Richard Baskett
Strings are arrays, so you can print out a string by doing something like this: $string = hey there!; for ($i=0; $icount($string); $i++) { echo strtoupper($string[$i]); } That's about all there is to it! :) Use the strtoupper() function if you mean to have everything uppercase like in your

Re: [PHP] String breaking up

2001-10-26 Thread Richard Baskett
To be more precise add the br at the end of the line between the for loop: Strings are arrays, so you can print out a string by doing something like this: $string = hey there!; for ($i=0; $icount($string); $i++) { echo strtoupper($string[$i]).'br'; } That's about all there is to it! :) Use

RE: [PHP] String breaking up

2001-10-26 Thread Kees Hoekzema
Strings are arrays, so you can print out a string by doing something like this: Yups, this is possible, but i think he wants to have a newline for each character, you can doe this excelent with a small addition to your example: $string = hey there!; for ($i=0; $icount($string); $i++) {

Re: [PHP] String breaking up

2001-10-26 Thread _lallous
$string = hey there!; $out = ''; for ($i=0; $icount($string); $i++) { $out .= strtoupper($string[$i]) . \n; // or br if output is to browser } echo $out; Richard Baskett [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Strings are arrays, so you can print

Re: [PHP] String breaking up

2001-10-26 Thread Dan McCullough
This only returns the first letter? --- _lallous [EMAIL PROTECTED] wrote: $string = hey there!; $out = ''; for ($i=0; $icount($string); $i++) { $out .= strtoupper($string[$i]) . \n; // or br if output is to browser } echo $out; Richard Baskett [EMAIL PROTECTED] wrote in message

Re: [PHP] String breaking up

2001-10-26 Thread * RzE:
Original message From: Dan McCullough [EMAIL PROTECTED] Date: Fri, Oct 26, 2001 at 06:03:00AM -0700 Message-ID: [EMAIL PROTECTED] Subject: [PHP] String breaking up I was looking to take a string like Dan and return it like D A N is it the str function that does that = Dan

Re: [PHP] string conversion

2001-09-20 Thread Jason G.
Andras, $aRay = split('.', 'mypicture.jpg'); $aRay[0] will be the filename $aRay[1] will be the extension -Jason Garber www.deltacron.com At 03:14 PM 9/20/2001 -0700, Andras Kende wrote: Hi, I trying to cut the last 4 char of a string but sometimes its cut 3 sometime 4 char

Re: [PHP] string conversion

2001-09-20 Thread Philip Olson
hi andras- consider the strstr() and strrstr() functions : $str = 'abcabc'; print strpos ($str,'b'); // 1 print strrpos($str,'b'); // 4 these positions can be used with other functions, such as substr() : $str = 'abc.png'; print strpos($str,'.');// 3

Re: [PHP] string conversion

2001-09-20 Thread Jason G.
Sorry, In this case, use explode() instead of split() ... Andras, $aRay = split('.', 'mypicture.jpg'); $aRay[0] will be the filename $aRay[1] will be the extension -Jason Garber www.deltacron.com At 03:14 PM 9/20/2001 -0700, Andras Kende wrote: Hi, I trying to cut the last 4 char of a

Re: [PHP] string concatenation

2001-07-25 Thread David Robley
On Thu, 26 Jul 2001 06:54, Seb Frost wrote: OK let's say in variable $search I have the string color (without the quote marks). now I want to be able to refer to the variable $color in my code. How in gods name do I do this. I guess somehow I have to combine a $ with the contents of

RE: [PHP] string concatenation

2001-07-25 Thread Seb Frost
]] Sent: 26 July 2001 02:10 To: Seb Frost; PHP Subject: Re: [PHP] string concatenation On Thu, 26 Jul 2001 06:54, Seb Frost wrote: OK let's say in variable $search I have the string color (without the quote marks). now I want to be able to refer to the variable $color in my code. How in gods

Re: [PHP] String Comparison

2001-07-24 Thread Jason Bell
oh wait.. I just realize my goof it is treating it like I want to divide image by pjpeg. LMAO *sigh* I guess I should just go home while I'm ahead. haha -Jason - Original Message - From: Jason Bell [EMAIL PROTECTED] To: PHP Users [EMAIL PROTECTED] Sent: Tuesday, July 24, 2001

Re: [PHP] String Comparison

2001-07-24 Thread Phil Driscoll
On Tuesday 24 July 2001 23:59, Jason Bell wrote: if (image/pjpeg == $type) { print Type is JPG; }; you need to put image/jpeg in quotes. Ideally you would also do a safer string comparison than == eg if(!strcmp('image/jpeg',$type)) -- Phil Driscoll -- PHP General Mailing List

RE: [PHP] string search

2001-07-18 Thread Ben Bleything
http://php.net/manual/en/function.strpos.php -Original Message- From: Joseph Bannon [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 7:46 AM To: PHP (E-mail) Subject: [PHP] string search I need a search function (if statement) that performs a search on a string and if the string

RE: [PHP] string replace using ereg

2001-07-16 Thread scott [gts]
$text = Hello there, test. My name is name; $ASSIGN = array(test = this is a test, 'name'= 'BOB', ); $OPENTAG = ; $CLOSETAG = ; print preg_replace( /$OPENTAG(.*?)$CLOSETAG/e, '$ASSIGN[$1]', $text ); prints: Hello there, this is a test. My name is BOB To do what you want, throw a loop

RE: [PHP] string replace using ereg

2001-07-16 Thread scott [gts]
preg_replace( /$OPENTAG(.*?)$CLOSETAG/e, '$ASSIGN[$1]', $text ); -Original Message- From: Jeroen Olthof [mailto:[EMAIL PROTECTED]] Sent: Monday, July 16, 2001 12:45 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] string replace using ereg Mmmm, thx , but I can't get it to work when I run

Re: [PHP] string varable...

2001-05-09 Thread Christian Reiniger
On Wednesday 09 May 2001 07:46, Vegard wrote: Does anybody know how much text can be stored in a variable og type string? Typically about 2^(sizeof(int) * 8 - 1) chars. On a normal 32 Bit machine that's 2 Gig, on a 64Bitter, one moment, 9223372036854775808 chars -- Christian Reiniger LGDC

RE: [PHP] String Type Unknown

2001-05-02 Thread Rudolf Visagie
titleRead Hex dump/title /head body ?echo HexToChar($Txt)? /body /html Cheers, Rudolf Visagie QEDI -Original Message- From: Nathan Cook [mailto:[EMAIL PROTECTED]] Sent: 01 May 2001 11:16 To: Rudolf Visagie Subject: Re: [PHP] String Type

Re: [PHP] String Type Unknown

2001-05-02 Thread Anuradha Ratnaweera
Since it contains only digits 0-9 and letters a-f, it looks like hexadecimal. Why don't you try to read two characters at a time and either convert them to binary or check their ascii values. There seem to be many ascii values however. Where did you get this from? Anuradha On Mon, 30 Apr

RE: [PHP] String Type Unknown

2001-05-02 Thread Rudolf Visagie
)? /body /html Rudolf Visagie QEDI -Original Message- From: Nathan Cook [mailto:[EMAIL PROTECTED]] Sent: 01 May 2001 11:16 To: Rudolf Visagie Subject: Re: [PHP] String Type Unknown How were you able to convert that? Thanks! Nathan Cook [EMAIL PROTECTED] - Original Message

Re: [PHP] String Type Unknown

2001-05-02 Thread Nathan Cook
From a field in an instantdb database (http://instantdb.enhydra.org) Nathan Cook [EMAIL PROTECTED] - Original Message - From: Anuradha Ratnaweera [EMAIL PROTECTED] To: Nathan Cook [EMAIL PROTECTED] Cc: Php List [EMAIL PROTECTED] Sent: Tuesday, May 01, 2001 11:03 PM Subject: Re: [PHP

Re: [PHP] String Type Unknown

2001-05-02 Thread Nathan Cook
Thank you, for your help it works great! Nathan Cook [EMAIL PROTECTED] - Original Message - From: Rudolf Visagie [EMAIL PROTECTED] To: Nathan Cook [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, May 02, 2001 4:47 AM Subject: RE: [PHP] String Type Unknown Nathan, Another way

RE: [PHP] String Type Unknown

2001-05-01 Thread Rudolf Visagie
Hi Nathan, It's a hex dump and it reads: ÿÿúÀÿÿÿí sr java.util.Properties9ÿÿý§càÿÿÿ~ L defaultst Ljava/util/Properties;xr java.util.Hashtableÿÿû°òR ÿÿÿäÿÿûEUR0 $` ¦ÆöDf7F÷$ -F?W6?öÆG??@ w  t imaget JIMG

RE: [PHP] String delimeters, arg!

2001-05-01 Thread Johnson, Kirk
I am having a problem with string delimiters. For some reason no matter what I do I can not get them to process correctly!! For example, ? $area_entered = yes; $date_entered = no; echo $area_entered\t\t\t$date_enteredbr; ? That outputs: yes no What am I doing wrong?! The \n

Re: [PHP] String delimeters, arg!

2001-05-01 Thread Gyozo Papp
Hello PHP'ers I am having a problem with string delimiters. For some reason no matter what I do I can not get them to process correctly!! For example, ? $area_entered = yes; $date_entered = no; echo $area_entered\t\t\t$date_enteredbr; ? That outputs: yes no What am I doing wrong?! Is

Re: [PHP] String delimeters, arg!

2001-05-01 Thread James, Yz
Hi Nick, to delete a cookie, simply use set_cookie(cookie_name); without appending any values. Possible solutions for the \t and \n : For \n to br, use: $string = nl2br($string); Not sure whether or not there a similar function for \t, though you could perhaps use some method to replace \t

Re: [PHP] string comparsion inf

2001-04-11 Thread Renze Munnik
[EMAIL PROTECTED] wrote: Hi all, I got a problem comparing the string "inf" with another in PHP3. It is used as File-Extention for information-files on our system. When comparing the following all works fine and the expected result is given: "otto" = "karl" =0 "otto" = "otto" =1

Re: [PHP] String in a string

2001-04-07 Thread Christian Reiniger
On Friday 06 April 2001 16:42, you wrote: How do I find out if a string is contained in a string. I just need true/false. strstr()? -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) This is JohnC IMHO, I compaired tri-word groupings here and in his plan and got a good match.

RE: [PHP] String in a string

2001-04-06 Thread Jon Haworth
Mike, You could investigate the functions strstr (www.php.net/strstr) and stristr (www.php.net/stristr), it sounds like they're what you're after. HTH Jon -Original Message- From: Mike [mailto:[EMAIL PROTECTED]] Sent: 06 April 2001 15:42 To: [EMAIL PROTECTED] Subject: [PHP] String in

Re: [PHP] String in a string

2001-04-06 Thread Martin Cabrera Diaubalick
Hello Mike, try preg_match See http://www.php.net/manual/en/function.preg-match.php HTH Regards - Original Message - From: Mike [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, April 06, 2001 4:42 PM Subject: [PHP] String in a string How do I find out if a string is

Re: [PHP] String in a string

2001-04-06 Thread Phil Driscoll
try preg_match A bit of a big hammer for cracking nuts. strstr and stristr will tax your server much more lightly, and, no doubt, do the job quicker as well. Cheers -- Phil Driscoll Dial Solutions +44 (0)113 294 5112 http://www.dialsolutions.com http://www.dtonline.org -- PHP General Mailing

RE: [PHP] String Functions (replace)

2001-03-25 Thread Brooks, Ken
Nevermind, stumbled across addslashes(). What a wonderful language. :) -ken -Original Message- From: Brooks, Ken [mailto:[EMAIL PROTECTED]] Sent: Sunday, March 25, 2001 10:45 AM To: [EMAIL PROTECTED] Subject: [PHP] String Functions (replace) I know this is completely stupid but how

Re: [PHP] string-integer

2001-03-23 Thread Chris Lee
even better, verify the date as a whole rather then just as an int. ?php $time = mktime(0, 0, 0, $month, $day, $year); $date = getdate($time); $month = $date['mon']; $day = $date['mday']; $year = $date['year']; ? there you go, try it. someone puts an invalid date in? no problem it

Re: [PHP] String indexing with braces

2001-03-07 Thread php3
Addressed to: Toby Butzon [EMAIL PROTECTED] [EMAIL PROTECTED] ** Reply to note from Toby Butzon [EMAIL PROTECTED] Wed, 07 Mar 2001 18:07:29 -0500 Greetings, I know there's been some discussion of adding support for string indexing (that would be exclusive to strings [because

Re: [PHP] string question

2001-02-23 Thread Philip Olson
Use number_format() : http://www.php.net/manual/en/function.number-format.php echo number_format($number); Other options exist with this function, it's pretty useful. Regards Philip Olson http://www.cornado.com/ On Fri, 23 Feb 2001 [EMAIL PROTECTED] wrote: I have a string that

RE: [PHP] string question

2001-02-23 Thread PHPBeginner.com
check out php.net/number-format Sincerely, Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) [EMAIL PROTECTED] www.phpbeginner.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Saturday, February 24, 2001 4:53 AM To:

Re: [PHP] String manipulation with ereg_replace

2001-02-22 Thread Simon Garner
From: "Ian LeBlanc" [EMAIL PROTECTED] I am working on a site that has over 1000 pages and all the images need to be made lower case in the HTML. Here is what I have so far. Please someone tell me what I am doing wrong. $contents="img src=ThisOneReallyNeedsToBeAllLowercase.gif

Re: [PHP] String manipulation with ereg_replace

2001-02-22 Thread Christian Reiniger
On Thursday 22 February 2001 23:42, Simon Garner wrote: This should do the trick (untested!): ? $contents = "img src=ThisOneReallyNeedsToBeAllLowercase.gif alt=ThisOneReallyNeedsToBeAllLowercase.gif"; $contents = preg_replace("/([-_a-zA-Z0-9]+)\.gif/e", "strtolower('\\1') .

Re: [PHP] String problem

2001-02-19 Thread CC Zona
In article 96s2sj$46a$[EMAIL PROTECTED], [EMAIL PROTECTED] ("Mike") wrote: I get this error Parse error: parse error, expecting `']'' in /on this. $Q= "Update $HTTP_POST_VARS[$keys[1]] Set $updateString Where $keys[0] =$HTTP_POST_VARS[$keys[0]]"; Try: $Q= "Update

<    1   2   3   4   5   >