[ create a new paste ] login | about

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

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

$bin= "1,2,3,4,5,6,ABC,AAA,77,00,11,AS,Code";
$array_of_values = explode(',', $bin);
$vn = 'NN';
foreach ($array_of_values as $k=>$v) {
  ${$vn.$k} = $v;
}


echo 'NN1:'.$NN1;
echo '|NN2:'.$NN2;
echo '|NN2:'.$NN3;
?>


Output:
1
NN1:2|NN2:3|NN2:4


Create a new paste based on this one


Comments: