开发者

problem occures in if condition [closed]

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜