[ create a new paste ] login | about

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

PHP, pasted on Jul 25:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
function getThePath($node1, $node2){ //pass strings

    //$n1 = $matchIDtoNum[$node1]; //get int (from pathdata)
    //$n2 = $matchIDtoNum[$node2];

$n1 = $node1;
$n2 = $node2;

    $res = array();
    $res[0] = $n1;
    $res[1] = $n2;

    return $res;

}

$res = getthepath(rand(1,5), rand(1,5));

print_r($res);
?>


Output:
1
2
3
4
5
Array
(
    [0] => 5
    [1] => 2
)


Create a new paste based on this one


Comments: