Re: [PHP] Removing an aspect of a variable...

2006-06-06 Thread Rob W.
Tnx. - Original Message - From: rich gray [EMAIL PROTECTED] To: Rob W. [EMAIL PROTECTED] Sent: Tuesday, June 06, 2006 2:44 AM Subject: Re: [PHP] Removing an aspect of a variable... substr($variable,0,-2); Rob W. wrote: Say I have a variable setting an ip address of 192.168.100.0

RE: [PHP] Removing an aspect of a variable...

2006-06-06 Thread Peter Lauri
: Tuesday, June 06, 2006 2:47 PM To: [EMAIL PROTECTED] Cc: php-general@lists.php.net Subject: Re: [PHP] Removing an aspect of a variable... Tnx. - Original Message - From: rich gray [EMAIL PROTECTED] To: Rob W. [EMAIL PROTECTED] Sent: Tuesday, June 06, 2006 2:44 AM Subject: Re: [PHP

Re: [PHP] Removing an aspect of a variable...

2006-06-06 Thread Robin Vickery
On 06/06/06, Rob W. [EMAIL PROTECTED] wrote: Say I have a variable setting an ip address of 192.168.100.0 I want to be able to remove the last to chr's of that variable ie: .0 What would be my best solution to do that? Remove the last two characters of a string? $shorterString =

Re: [PHP] Removing an aspect of a variable...

2006-06-06 Thread Paul Novitski
At 12:37 AM 6/6/2006, Rob W. wrote: Say I have a variable setting an ip address of 192.168.100.0 I want to be able to remove the last to chr's of that variable ie: .0 What would be my best solution to do that? If you want the last two characters you can use substr(): [1] $sResult =

Re: [PHP] Removing an aspect of a variable...

2006-06-06 Thread David Otton
On Tue, 6 Jun 2006 08:52:46 +0100, Robin Vickery wrote: On 06/06/06, Rob W. [EMAIL PROTECTED] wrote: Say I have a variable setting an ip address of 192.168.100.0 I want to be able to remove the last to chr's of that variable ie: .0 What would be my best solution to do that? Remove the last