I have a function getPrice($_SESSION['external']);
function getPrice($position)
{
//Here I perform SQL functions using $position['arraykey']
//This works
//Here I want to add to the array
//This doesn't work
$position[0]['pricing'] = $sql_result;
}
When I use $position
it doesn't add to the array, but when I use $_SESSION['external']
it works fine.
I'm not sure why $position
works in the SQL query part of my function but one line bellow when I try to add the result to the array, it doesn't.
pastebin
of your code snippet ?