誰も私の問題を解決することができます。そのdrupal 7ビューでは、私はなぜif条件が満たされていない(if($ mycount == 1))次のコードで知りません。ビューグローバルカウンタIF状態が機能していませんか?
foreach ($fields as $id => $field){
if($field->class == "counter")
{
$mycount = $field->content;
echo $mycount;
echo "<br>";
}
if($field->class == "field-logo")
{
var_dump($mycount); // output
echo "<br>";
if($mycount == 1) // but here 1 == 1 for the first time. see the output.
{
echo "worked"; // its not coming here...
}
}
}
OUTPUT:
1
string(36) "1"
2
string(36) "2"
3
string(36) "3"
4
string(36) "4"
5
string(36) "5"
感謝。