[ create a new paste ] login | about

Link: http://codepad.org/57nJNGLl    [ raw code | output | fork ]

PHP, pasted on Jan 17:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php

$test = array(
  0 => 'my searcg',
  1 => 'set-cookie: shdugdd',
  2 => 'viable: dunno'
);

$matches = preg_grep('/set-cookie/', $test); 
$keys    = array_keys($matches); 

print_r($matches);  

?> 


Output:
1
2
3
4
5
Array
(
    [1] => set-cookie: shdugdd
)
 


Create a new paste based on this one


Comments: