You either have to pass it into the function via its variables:
function doSomething($sid, $conms) {
}
(This means you have to change it everywhere that function is used)
or a quicker method would be to use a global variable:
[php]function doSomething($sid) {
global $conms;
}
(This means you do not have to update the function everywhere it is used)