I have a couple of function share the same value, so I was thinking about a way to put the value of a function, then all function could share these values, but I am encountering an issue that the I could not pass these value into the function. Do you have any better way to achieve this or do you think I should just type each value inside each function?
<?php
$current_user=get_current_user_id();
$display_user= bp_displayed_user_id();
function vote_my_faith($current_user,$display_user){
echo $current_user;
echo $display_user;
}
?>