Jump to content


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


in_array() wrong datatype for second arguement???

Recommended Posts

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

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?


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.