Variable as col-value

QuestionsVariable as col-value
Mario asked 9 years ago

Hello,

for the following options, I want to use variables like:

$switch = false;
$switch = true;

As Values for colums:

$col["hidden"] = false;
$col["hidden"] = true;

I think of using something like:

$col["hidden"] = $switch;
or:
$col["hidden"] = echo $switch;

However, it does not work, even if the variable byitself is working. But how do I integrate a variable as synonym for "true" or "false"? I plan to switch on or off a column by this variable.

Thanks for help
Mario

1 Answers
Abu Ghufran answered 9 years ago

You need to set string 'true' / 'false'
e.g.
$switch = 'true';

Your Answer

6 + 12 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?