Changing Variable in php
-
I am trying to add a simple if statement to a template in php
Basically very simple and a global variable for the whole site.
if the variable ‘available’ = false
then change another variable ‘price’ to “Rented”
Both are slug attributes.
I’m not really php conversant but came up with this which obviously is not the answer.<?php if($[‘available’] = FALSE);{
$[‘price’] = “RENTED”;
}
<?Any assistance would be appreciated.
- The topic ‘Changing Variable in php’ is closed to new replies.