开发者

problem occures in if condition [closed]

开发者 https://www.devze.com 2023-01-19 16:21 出处:网络
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form. For help clari
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 12 years ago.

I am tring to give condition, but it cant give appropriate result.

like

if($this->data['EmployeeExprienceDetail']['file_n开发者_如何转开发ame']['type'] != 'image/jpeg')

is this condition is ok or not...guide me

thanks


Best way to check what is being passed back it to output what you want to validate against.

This will print the value to the screen

echo $this->data['EmployeeExprienceDetail']['file_name']['type']."<br />";

This will print the (if array) value to the screen

echo "<pre>".print_r($this->data['EmployeeExprienceDetail']['file_name']['type'],true)."</pre><br />";

This will print the raw value(s) to the screen

echo var_dump($this->data['EmployeeExprienceDetail']['file_name']['type']);

This will print the value to the screen, useful for displaying whitespace as you might need to trim the value before comparing it

echo "|".$this->data['EmployeeExprienceDetail']['file_name']['type']."|<br />";
0

精彩评论

暂无评论...
验证码 换一张
取 消