PHP implementation code to reassign a certain column element

小云云
Release: 2023-03-20 17:08:01
Original
1961 people have browsed it

This article mainly shares with you the PHP implementation code for reassigning a certain column of elements. I hope it can help you.

		foreach($list as $k=>$val){   
		    if ( $val == "" ) {  
		        continue;  
		    }  
		    foreach ($range as $key => $value) {
		    	//将时间替换成 年-月-日的形式 
			    if( $val['bodycode'] == $value['bodycode']){
			   
			    	$list[$k]['edittime'] = date("Y-m-d ", $value['time']);
			    }
		    }
		}
Copy after login

Related recommendations:

PHP implementation of deleting multiple array object attributes and reassigning them

The above is the detailed content of PHP implementation code to reassign a certain column element. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!