I want to compare to a string but it is not working.
First I took it in my script and stored in a variable, and after that I stored the variable in the session.
This is my code...
<?php
    $currencyName1 = "<script>document.write(data);</script>";
    $_SESSION["currencyVal"] = $currencyName1;
    $price = strip_tags($this->session->userdata('currencyVal'));
    $price1 = substr($price,14,17);
    if (strcmp($price,"SAR")) {
        echo "SAR"; 
    } else {
        echo "USD"; 
    }
?>
 
     
    