Re: [PHP] string vs. integer...

2001-02-07 Thread Steve Werby
"Julia A . Case" [EMAIL PROTECTED] wrote: How do I detrmine of a value is a string or a integer? I'm trying to tell the differnce between "machine.domain.com" and "192.168.2.1" I was going to explode on "." and parse through the data and validate it. is_numeric(), is_string() -- Steve

Re: [PHP] string length?

2001-01-30 Thread Jon Jacob
Kevin Connolly wrote: Hi, I am quite new to PHP scripts and I have run into a little problem with my string! I have a string called $numbers which is 5;6;12;21;36;42 (for example, it can be any 6 numbers between 1 and 42). Is there an easy way that I can find out how many numbers there are

Re: [PHP] string length?

2001-01-30 Thread Philip Olson
Hi Kevin, First thought that comes to mind is explode() so something like : ?php $string = '5;6;12;21;36;42'; $count = count(explode(';',$string)); ? I assume that would work. That explodes it into an array then counts it, check out :

Re: [PHP] string length?

2001-01-30 Thread Joe Stump
if you just want to know how many numbers are in it you can do this: $num_of_numbers = sizeof(explode(';',$string)); --Joe On Tue, Jan 30, 2001 at 04:46:50PM -0800, Jon Jacob wrote: Kevin Connolly wrote: Hi, I am quite new to PHP scripts and I have run into a little problem with my

RE: [PHP] String to Variable converstion

2001-01-17 Thread Cal Evans
try: http://www.zend.com/manual/function.eval.php Cal http://www.calevans.com -Original Message- From: Paul Cohen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 17, 2001 6:14 PM To: [EMAIL PROTECTED] Subject: [PHP] String to Variable converstion Hello all, I am trying to build

Re: [PHP] string replace

2001-01-16 Thread Nathan Cook
You may want to try exploding on the ".": $fooPieces = explode($foo, "."); That way everything before the dot, is in the first piece of the array and everything after is in the second part of the array. However this may cause issues if filenames will contain dots. But if you follow an 8.3 or

RE: [PHP] string replace

2001-01-16 Thread Jerry Lake
Here is a bad way to do it, but it works ? $string = "test.jpg"; $replace = eregi_replace("$", "", $string); echo $replace; ? Jerry Lake -Original Message- From: Tait Grove [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 16, 2001 12:01 PM To: PHP GENERAL Subject: [PHP] string

<    1   2   3   4   5