Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #15894
| From | albert <alstopspam@stopaspam.com> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: extract values from string |
| Date | 2015-11-14 11:39 +0100 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <n27316$vt0$2@speranza.aioe.org> (permalink) |
| References | (1 earlier) <n2540n$kfj$1@dont-email.me> <n25dlg$tg0$1@speranza.aioe.org> <n25ig7$iir$1@dont-email.me> <n25rov$s66$1@speranza.aioe.org> <n261id$epq$1@dont-email.me> |
> After further thinking about this, here's a shorter version which uses
> explode() twice and might work for you, also:
>
> function findvals($str) {
> $nums = explode('/', $str);
> if (count($nums) != 3)
> return false;
> $vals = explode(" ", $nums[2]);
> return $vals;
> }
>
> $data = findvals("xx/yy/178 1771 80 279");
> if ($data)
> print_r($data);
> else
> echo "Error!\n";
>
which is more fast?
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
extract values from string albert <alstopspam@stopaspam.com> - 2015-11-13 16:22 +0100
Re: extract values from string Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-13 11:46 -0500
Re: extract values from string albert <alstopspam@stopaspam.com> - 2015-11-13 20:28 +0100
Re: extract values from string Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-13 15:53 -0500
Re: extract values from string albert <alstopspam@stopaspam.com> - 2015-11-14 00:29 +0100
Re: extract values from string Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-13 20:10 -0500
Re: extract values from string albert <alstopspam@stopaspam.com> - 2015-11-14 11:39 +0100
Re: extract values from string Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-14 08:58 -0500
Re: extract values from string Matthew Carter <m@ahungry.com> - 2015-11-14 23:20 -0500
Re: extract values from string Jerry Stuckle <jstucklex@attglobal.net> - 2015-11-15 09:47 -0500
Re: extract values from string Denis McMahon <denismfmcmahon@gmail.com> - 2015-11-17 13:02 +0000
csiph-web