Jump to content


Photo

in_array() wrong datatype for second arguement???


  • Please log in to reply
1 reply to this topic

#1 emehrkay

emehrkay
  • Staff Alumni
  • Advanced Member
  • 1,214 posts

Posted 24 August 2006 - 06:25 PM

this is my 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";

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

#2 emehrkay

emehrkay
  • Staff Alumni
  • Advanced Member
  • 1,214 posts

Posted 24 August 2006 - 06:31 PM

its needle, haystack - i had it the other way around




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users