Hi All,
I want to use PHP function in ruby code. I want to pass ruby variables to php function. And can anyone say how to run call a php function in ruby model.
Ruby Model
Does any body has idea about Serialize in ruby so that i can store the variables and i can use stored variables and i can unserialize in PHP.
Please help me. Thanks in advance.
I want to use PHP function in ruby code. I want to pass ruby variables to php function. And can anyone say how to run call a php function in ruby model.
Ruby Model
Code:
class test < ActiveRecord::Base
def sample
a1 = "username"
a2 = "value"
// here i need to use php funtion that will be using the ruby variable
end
end
PHP File
<?php
function sas($username , $value)
{
echo "Test PHP Program";
echo $username;
echo $value;
}
echo "OUT";
?>
Please help me. Thanks in advance.
Comment