Jump to content

Archived

This topic is now archived and is closed to further replies.

emehrkay

in_array() wrong datatype for second arguement???

Recommended Posts

this is my code
[code]
$btnArr = array("6","7","8","9","12");
var_dump($this->_role);
$editBtn = (in_array($btnArr, $this->_role)) ? $edit_link.$edit."</a>\n" : $edit_dim."\n";
[/code]

my btnArr was just numbers until i did a var dump and found out that my role property is a string of one character. so i canged my btnArr to strings and i still get the wrong datatype - whats up?

thanks

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.