PASTEBIN
| #1 paste tool since 2002
create new paste
tools
api
archive
faq
PASTEBIN
create new paste
trending pastes
sign up
login
my alerts
my settings
my profile
Don't like ads?
PRO users
don't see any ads ;-)
Public Pastes
Untitled
6 sec ago
Untitled
8 sec ago
Untitled
11 sec ago
REVELATIONS
14 sec ago
Untitled
26 sec ago
Untitled
15 sec ago
Untitled
17 sec ago
Untitled
18 sec ago
nih
By: a guest on
Apr 25th, 2012
| syntax:
PHP
| size: 0.17 KB | hits: 11 | expires: Never
download
|
raw
|
embed
|
report abuse
|
print
This paste has a previous version,
view the difference
.
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
class
multiple
{
function
multiple
(
$datas
)
{
$x
=
1.2
;
foreach
(
$datas
as
$data
)
{
if
(
$data
==
$x
)
{
$z
[
]
=
$data
;
}
$x
++;
}
return
$z
;
}
}
create a
new version
of this paste
RAW Paste Data
class multiple { function multiple($datas) { $x = 1.2; foreach($datas as $data){ if($data == $x){ $z[] = $data; } $x++; } return $z; } }