I'm getting the error:
Can't use function return value in write context
when trying to use this function call:
<?php if ( get_price( item_1 ) = 100) { ?>
Hello
<?php } else { } ?> 
This is the function:
function get_price($m) {
global $item,$i;    
  if ($m == "item_1") {
    $value =  $item[$i]["a_price"];
  }  
  else { 
    $value = $item[$i]["price"];
  }
  return $value;
}
The function DOES work when I do something like this though:
<?= get_total_price( item_1 ) ?>
Or when I use != Operator like:
<?php if ( get_price( item_1 ) != 100) { ?>
So I have no clue what's the problem with this specific use
 
     
    