Foreach ($ stringas $ key = & gt; $ val) What is the usage? How can this problem be solved?
Source: Internet
Author: User
Foreach ($ stringas $ key = & amp; gt; $ val) What is the usage? If (is_array ($ string) & nbsp ;{& nbsp; // if it is an array, this function is executed cyclically & nbsp; & nbsp; & nbsp foreach ($ string as $ key => $ val) What is the usage?
If (is_array ($ string) {// if it is an array, this function is executed cyclically.
Foreach ($ string as $ key => $ val ){
$ String [$ key] = daddslashes ($ val, $ force );
}
Read the code analysis article of discuz and read this in the daddslashes function. traverse the array and assign a value to the key? But if I write it like this, I keep reporting errors. why? Share To: $ val) What is this usage ?] If (is_array ($ string ))? {? // If it is an array, this function is cyclically executed ???????????? Foreach ($ string? As? $ Key? =>? $ Va... 'data-pics = ''>
------ Solution --------------------
You must have read reprinted articles.
> Actually>, it is estimated that the background treats it as a special html character.
Foreach ($ string as $ key => $ val)
Foreach ($ string as $ key => $ val)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.