04greg1980
New Member
Hello,
I would like to use on an another page of my website an information of a field text in a php code.
I would like to compare the field text to another text.
I have try this code:
<?php
$x = "News";
$y ='{soumission___type}';
echo $y;echo $x;
// Compare $x and $y
if (strcmp($x,$y) == 0) {
echo 'Same content';
}
else {
echo 'Different content';
}
But the answer is always "Different content" as if $x is really igual to $y.
Have you a solution?
Thanks a lot
Greg
I would like to use on an another page of my website an information of a field text in a php code.
I would like to compare the field text to another text.
I have try this code:
<?php
$x = "News";
$y ='{soumission___type}';
echo $y;echo $x;
// Compare $x and $y
if (strcmp($x,$y) == 0) {
echo 'Same content';
}
else {
echo 'Different content';
}
But the answer is always "Different content" as if $x is really igual to $y.
Have you a solution?
Thanks a lot
Greg