codepad.viper-7.com
Script:
(hide)
Author
unknown
Size:
1012 b
Created:
01/12/2012 9:44am
Version:
1
Hits:
35
Render Time:
0.00 ms
PHP Version
trunk-dev
5.5-dev
5.4.9
5.4-dev
5.3.19
5.3.10
5.3-dev
5.2.17
Output:
HTML
(hide)
Code:
(hide)
<?php
$data = array(
0 => array(
'service' => 'twitter',
'url' => 'https://twitter.com/1/',
'color' => 'silver',
),
1 => array(
'service' => 'google_plus',
'url' => 'https://plus.google.com/2/posts',
'color' => 'silver',
),
2 => array(
'service' => 'facebook',
'url' => 'https://www.facebook.com/3/',
'color' => 'blue',
),
3 => array(
'service' => 'linkedin',
'url' => 'http://us.linkedin.com/company/4/',
'color' => 'blue',
),
4 => array(
'service' => 'youtube',
'url' => 'http://www.youtube.com/user/5/',
'color' => 'silver',
),
);
$silver = array_filter($data,function($v){ return $v['color'] == "silver" ;});
$blue = array_filter($data,function($v){ return $v['color'] == "blue" ;});
foreach(array_map(null, $silver,$blue) as $set)
{
foreach($set as $var)
{
printf("<a href=\"%s\" style=\"color:%s;\">%s</a> <br />",$var['url'],$var['color'],$var['service']);
}
}
?>
User
Create Account
Log In
Views
Request Headers
Response Headers
Response Body
Opcodes
Profile
Call Graph
Controls
New Paste
Paste History
unknown:
untitled