Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #8950

Re: Need help with stripping characters from numbers in array

From Salvatore <sal@yojimbo.hack.invalid>
Newsgroups comp.lang.php
Subject Re: Need help with stripping characters from numbers in array
Date 2013-04-05 17:43 +0000
Organization Yojimbo NNTP server
Message-ID <kjn2g3$1qh8$1@yojimbo.hack> (permalink)
References <635033e6-79ad-497c-b084-c0ebab234ee8@googlegroups.com>

Show all headers | View raw


On 2013-04-05, daveh@allheller.net <daveh@allheller.net> wrote:
> So basically I have to traverse an array element by element check if it is a number and if so strip it otherwise leave it alone and go to next and save the results into an array and the return that array. Or I can simply remove plus, minus or dot chars from every element. (that is all that I would need as that would cover every conceivable scenario)
>
> Can someone suggest how to code this?

A foreach (key => value) loop?

-- 
Blah blah bleh...
GCS/CM d(-)@>-- s+:- !a C++$ UBL++++$ L+$ W+++$ w M++ Y++ b++

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Need help with stripping characters from numbers in array daveh@allheller.net - 2013-04-05 09:01 -0700
  Re: Need help with stripping characters from numbers in array Salvatore <sal@yojimbo.hack.invalid> - 2013-04-05 17:43 +0000
  Re: Need help with stripping characters from numbers in array Christoph Becker <cmbecker69@gmx.de> - 2013-04-05 20:41 +0200
  Re: Need help with stripping characters from numbers in array daveh@allheller.net - 2013-04-05 13:49 -0700

csiph-web