emehrkay Posted August 24, 2006 Share Posted August 24, 2006 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 Link to comment https://forums.phpfreaks.com/topic/18565-in_array-wrong-datatype-for-second-arguement/ Share on other sites More sharing options...
emehrkay Posted August 24, 2006 Author Share Posted August 24, 2006 its needle, haystack - i had it the other way around Link to comment https://forums.phpfreaks.com/topic/18565-in_array-wrong-datatype-for-second-arguement/#findComment-79970 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.